diff --git a/.devtoolset-4-gdb.metadata b/.devtoolset-4-gdb.metadata index b25a4ab..943e016 100644 --- a/.devtoolset-4-gdb.metadata +++ b/.devtoolset-4-gdb.metadata @@ -1,2 +1,2 @@ -95338f65ae9f61ecb76592f2cbe336a7d948b905 SOURCES/gdb-7.10.tar.xz +466208d771d97d3dfcf965d5c835a669cff8d847 SOURCES/gdb-7.11.tar.xz 05900bf0a6c153020fd71d994802b4d4d80baba1 SOURCES/gdb-libstdc++-v3-python-r225521.tar.xz diff --git a/.gitignore b/.gitignore index 892b1c5..c75e5a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/gdb-7.10.tar.xz +SOURCES/gdb-7.11.tar.xz SOURCES/gdb-libstdc++-v3-python-r225521.tar.xz diff --git a/SOURCES/gdb-6.3-attach-see-vdso-test.patch b/SOURCES/gdb-6.3-attach-see-vdso-test.patch index a0923f8..e0e826a 100644 --- a/SOURCES/gdb-6.3-attach-see-vdso-test.patch +++ b/SOURCES/gdb-6.3-attach-see-vdso-test.patch @@ -1,5 +1,7 @@ ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/attach-see-vdso.c 6 Jul 2007 14:14:44 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c 2016-02-15 23:25:36.749601045 +0100 @@ -0,0 +1,25 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -26,8 +28,10 @@ + pause (); + return 1; +} ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/attach-see-vdso.exp 6 Jul 2007 14:14:44 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp 2016-02-15 23:25:44.889658840 +0100 @@ -0,0 +1,72 @@ +# Copyright 2007 + @@ -54,8 +58,8 @@ + +set testfile "attach-see-vdso" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}] ++set binfile [standard_output_file ${testfile}] ++set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]] + +# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64). +# diff --git a/SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch b/SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch index 91dc69a..7aca124 100644 --- a/SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch +++ b/SOURCES/gdb-6.3-bz202689-exec-from-pthread-test.patch @@ -3,8 +3,10 @@ * gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files. ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:06.936904418 +0100 @@ -0,0 +1,46 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -52,8 +54,10 @@ + execl ("/bin/true", "/bin/true", NULL); + abort (); +} ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:19.965992585 +0100 @@ -0,0 +1,41 @@ +# threaded-exec.exp -- Check reset of the tracked threads on exec*(2) +# Copyright (C) 2007 Free Software Foundation, Inc. @@ -77,7 +81,7 @@ + +set testfile threaded-exec +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } { + return -1 diff --git a/SOURCES/gdb-6.3-bz231832-obstack-2gb.patch b/SOURCES/gdb-6.3-bz231832-obstack-2gb.patch deleted file mode 100644 index 1a19d34..0000000 --- a/SOURCES/gdb-6.3-bz231832-obstack-2gb.patch +++ /dev/null @@ -1,177 +0,0 @@ -https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832 - - -Index: gdb-7.8.50.20141228/include/obstack.h -=================================================================== ---- 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. */ - --extern void _obstack_newchunk (struct obstack *, int); -+extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE); - extern void _obstack_free (struct obstack *, void *); --extern int _obstack_begin (struct obstack *, int, int, -+extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int, - void *(*) (long), void (*) (void *)); --extern int _obstack_begin_1 (struct obstack *, int, int, -+extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int, - void *(*) (void *, long), - void (*) (void *, void *), void *); --extern int _obstack_memory_used (struct obstack *); -+extern PTR_INT_TYPE _obstack_memory_used (struct obstack *); - - /* Do the function-declarations after the structs - but before defining the macros. */ - - void obstack_init (struct obstack *obstack); - --void * obstack_alloc (struct obstack *obstack, int size); -+void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size); - --void * obstack_copy (struct obstack *obstack, void *address, int size); --void * obstack_copy0 (struct obstack *obstack, void *address, int size); -+void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size); -+void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size); - - void obstack_free (struct obstack *obstack, void *block); - --void obstack_blank (struct obstack *obstack, int size); -+void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size); - --void obstack_grow (struct obstack *obstack, void *data, int size); --void obstack_grow0 (struct obstack *obstack, void *data, int size); -+void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size); -+void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size); - - void obstack_1grow (struct obstack *obstack, int data_char); - void obstack_ptr_grow (struct obstack *obstack, void *data); -@@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o - - void * obstack_finish (struct obstack *obstack); - --int obstack_object_size (struct obstack *obstack); -+PTR_INT_TYPE obstack_object_size (struct obstack *obstack); - --int obstack_room (struct obstack *obstack); --void obstack_make_room (struct obstack *obstack, int size); -+PTR_INT_TYPE obstack_room (struct obstack *obstack); -+void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size); - void obstack_1grow_fast (struct obstack *obstack, int data_char); - void obstack_ptr_grow_fast (struct obstack *obstack, void *data); - void obstack_int_grow_fast (struct obstack *obstack, int data); --void obstack_blank_fast (struct obstack *obstack, int size); -+void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size); - - void * obstack_base (struct obstack *obstack); - void * obstack_next_free (struct obstack *obstack); - int obstack_alignment_mask (struct obstack *obstack); --int obstack_chunk_size (struct obstack *obstack); --int obstack_memory_used (struct obstack *obstack); -+size_t obstack_chunk_size (struct obstack *obstack); -+size_t obstack_memory_used (struct obstack *obstack); - - /* Error handler called when `obstack_chunk_alloc' failed to allocate - more memory. This can be set to a user defined function. The -@@ -318,7 +318,7 @@ extern int obstack_exit_failure; - # define obstack_make_room(OBSTACK,length) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ -- int __len = (length); \ -+ PTR_INT_TYPE __len = (length); \ - if (__o->chunk_limit - __o->next_free < __len) \ - _obstack_newchunk (__o, __len); \ - (void) 0; }) -@@ -331,7 +331,7 @@ __extension__ \ - # define obstack_grow(OBSTACK,where,length) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ -- int __len = (length); \ -+ PTR_INT_TYPE __len = (length); \ - if (__o->next_free + __len > __o->chunk_limit) \ - _obstack_newchunk (__o, __len); \ - _obstack_memcpy (__o->next_free, (where), __len); \ -@@ -341,7 +341,7 @@ __extension__ \ - # define obstack_grow0(OBSTACK,where,length) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ -- int __len = (length); \ -+ PTR_INT_TYPE __len = (length); \ - if (__o->next_free + __len + 1 > __o->chunk_limit) \ - _obstack_newchunk (__o, __len + 1); \ - _obstack_memcpy (__o->next_free, (where), __len); \ -@@ -392,7 +392,7 @@ __extension__ \ - # define obstack_blank(OBSTACK,length) \ - __extension__ \ - ({ struct obstack *__o = (OBSTACK); \ -- int __len = (length); \ -+ PTR_INT_TYPE __len = (length); \ - if (__o->chunk_limit - __o->next_free < __len) \ - _obstack_newchunk (__o, __len); \ - obstack_blank_fast (__o, __len); \ -Index: gdb-7.8.50.20141228/libiberty/obstack.c -=================================================================== ---- 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 - #if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION -+#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */ - #define ELIDE_CODE - #endif - #endif -+#endif - - - #ifndef ELIDE_CODE -@@ -139,7 +141,7 @@ struct obstack *_obstack; - free up some memory, then call this again. */ - - int --_obstack_begin (struct obstack *h, int size, int alignment, -+_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment, - POINTER (*chunkfun) (long), void (*freefun) (void *)) - { - register struct _obstack_chunk *chunk; /* points to new chunk */ -@@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s - } - - int --_obstack_begin_1 (struct obstack *h, int size, int alignment, -+_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment, - POINTER (*chunkfun) (POINTER, long), - void (*freefun) (POINTER, POINTER), POINTER arg) - { -@@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int - to the beginning of the new one. */ - - void --_obstack_newchunk (struct obstack *h, int length) -+_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length) - { - register struct _obstack_chunk *old_chunk = h->chunk; - register struct _obstack_chunk *new_chunk; -@@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER - abort (); - } - --int -+PTR_INT_TYPE - _obstack_memory_used (struct obstack *h) - { - register struct _obstack_chunk* lp; -- register int nbytes = 0; -+ register PTR_INT_TYPE nbytes = 0; - - for (lp = h->chunk; lp != 0; lp = lp->prev) - { -@@ -421,6 +423,7 @@ print_and_abort (void) - } - - #if 0 -+/* These functions are now broken for 64-bit obstack! */ - /* These are now turned off because the applications do not use it - and it uses bcopy via obstack_grow, which causes trouble on sysV. */ - diff --git a/SOURCES/gdb-6.3-inferior-notification-20050721.patch b/SOURCES/gdb-6.3-inferior-notification-20050721.patch index 0eb397c..56f016b 100644 --- a/SOURCES/gdb-6.3-inferior-notification-20050721.patch +++ b/SOURCES/gdb-6.3-inferior-notification-20050721.patch @@ -9,10 +9,10 @@ * gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set. -Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.c 2011-03-20 20:15:57.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c 2016-02-15 23:23:02.923499512 +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 @@ -34,10 +34,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.c + } + return 0; +} -Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp 2011-03-20 20:20:03.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp 2016-02-15 23:25:11.385420957 +0100 @@ -0,0 +1,245 @@ +# Copyright 2005 Free Software Foundation, Inc. + @@ -77,9 +77,9 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp +set testfile "attach-32" +set srcfile ${testfile}.c +set srcfile2 ${testfile}b.c -+set binfile ${objdir}/${subdir}/${testfile} -+set binfile2 ${objdir}/${subdir}/${testfile}b -+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}] ++set binfile [standard_output_file ${testfile}] ++set binfile2 [standard_output_file ${testfile}b] ++set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]] + +#execute_anywhere "rm -f ${binfile} ${binfile2}" +remote_exec build "rm -f ${binfile} ${binfile2}" @@ -284,10 +284,10 @@ Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32.exp +do_call_attach_tests + +return 0 -Index: gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32b.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20110320/gdb/testsuite/gdb.base/attach-32b.c 2011-03-20 20:15:57.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c 2016-02-15 23:23:02.924499519 +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 diff --git a/SOURCES/gdb-6.3-inheritancetest-20050726.patch b/SOURCES/gdb-6.3-inheritancetest-20050726.patch index ab81976..ae3a22c 100644 --- a/SOURCES/gdb-6.3-inheritancetest-20050726.patch +++ b/SOURCES/gdb-6.3-inheritancetest-20050726.patch @@ -5,10 +5,10 @@ * gdb.cp/b146835b.cc: Ditto. * gdb.cp/b146835.h: Ditto. -Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc 2009-08-12 06:07:50.000000000 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc 2016-02-16 09:49:08.743886620 +0100 @@ -0,0 +1,11 @@ +#include "b146835.h" + @@ -21,10 +21,10 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc +void A::funcD (class E *e, class D *d) {} +void A::funcE (E *e, D *d) {} +void A::funcF (unsigned long x, D *d) {} -Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc 2009-08-12 06:07:50.000000000 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc 2016-02-16 09:49:08.744886627 +0100 @@ -0,0 +1,32 @@ +#include "b146835.h" +#include @@ -58,10 +58,10 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc + f.foo(); +} + -Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp 2009-08-12 06:58:28.000000000 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp 2016-02-16 09:51:48.601968339 +0100 @@ -0,0 +1,47 @@ +# This testcase is part of GDB, the GNU debugger. + @@ -87,7 +87,7 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp +set testfile "b146835" +set srcfile ${testfile}.cc +set srcfile2 ${testfile}b.cc -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } { + return -1 +} @@ -110,10 +110,10 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp + +# Verify that we can access the inherited member d +gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible" -Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h 2009-08-12 06:07:50.000000000 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h 2016-02-16 09:49:08.744886627 +0100 @@ -0,0 +1,36 @@ + +class A { diff --git a/SOURCES/gdb-6.3-readnever-20050907.patch b/SOURCES/gdb-6.3-readnever-20050907.patch index 8eeb59c..ef8cf51 100644 --- a/SOURCES/gdb-6.3-readnever-20050907.patch +++ b/SOURCES/gdb-6.3-readnever-20050907.patch @@ -11,10 +11,10 @@ * gdb.texinfo (File Options): Document --readnever. -Index: gdb-7.9.50.20150520/gdb/doc/gdb.texinfo +Index: gdb-7.10.50.20151022/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/doc/gdb.texinfo 2015-05-31 16:34:58.436379663 +0200 -+++ gdb-7.9.50.20150520/gdb/doc/gdb.texinfo 2015-05-31 16:35:03.452416381 +0200 +--- gdb-7.10.50.20151022.orig/gdb/doc/gdb.texinfo 2015-10-22 22:16:50.483482288 +0200 ++++ gdb-7.10.50.20151022/gdb/doc/gdb.texinfo 2015-10-22 22:28:22.042554142 +0200 @@ -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,10 +28,10 @@ Index: gdb-7.9.50.20150520/gdb/doc/gdb.texinfo @end table @node Mode Options -Index: gdb-7.9.50.20150520/gdb/main.c +Index: gdb-7.10.50.20151022/gdb/main.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/main.c 2015-05-31 16:34:58.439379685 +0200 -+++ gdb-7.9.50.20150520/gdb/main.c 2015-05-31 16:35:20.547541518 +0200 +--- gdb-7.10.50.20151022.orig/gdb/main.c 2015-10-22 22:16:50.485482299 +0200 ++++ gdb-7.10.50.20151022/gdb/main.c 2015-10-22 22:28:22.042554142 +0200 @@ -604,6 +604,7 @@ captured_main (void *data) {"tui", no_argument, 0, OPT_TUI}, {"dbx", no_argument, &dbx_commands, 1}, @@ -48,10 +48,10 @@ Index: gdb-7.9.50.20150520/gdb/main.c --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ -Index: gdb-7.9.50.20150520/gdb/symfile.c +Index: gdb-7.10.50.20151022/gdb/symfile.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/symfile.c 2015-05-31 16:34:58.440379692 +0200 -+++ gdb-7.9.50.20150520/gdb/symfile.c 2015-05-31 16:35:03.454416395 +0200 +--- gdb-7.10.50.20151022.orig/gdb/symfile.c 2015-10-22 22:16:50.486482305 +0200 ++++ gdb-7.10.50.20151022/gdb/symfile.c 2015-10-22 22:28:22.043554148 +0200 @@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup ( /* Global variables owned by this file. */ @@ -60,33 +60,33 @@ Index: gdb-7.9.50.20150520/gdb/symfile.c /* Functions this file defines. */ -Index: gdb-7.9.50.20150520/gdb/dwarf2read.c +Index: gdb-7.10.50.20151022/gdb/dwarf2read.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-31 16:34:58.446379736 +0200 -+++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-31 16:35:03.459416432 +0200 -@@ -69,6 +69,7 @@ - #include "source.h" +--- gdb-7.10.50.20151022.orig/gdb/dwarf2read.c 2015-10-22 22:28:22.046554165 +0200 ++++ gdb-7.10.50.20151022/gdb/dwarf2read.c 2015-10-22 22:29:17.664881642 +0200 +@@ -70,6 +70,7 @@ #include "filestuff.h" #include "build-id.h" + #include "namespace.h" +#include "top.h" #include #include -@@ -2050,7 +2051,8 @@ dwarf2_has_info (struct objfile *objfile +@@ -2059,7 +2060,8 @@ dwarf2_has_info (struct objfile *objfile (void *) names); dwarf2_per_objfile->objfile = objfile; } - return (!dwarf2_per_objfile->info.is_virtual + return !readnever_symbol_files && + (!dwarf2_per_objfile->info.is_virtual - && dwarf2_per_objfile->info.s.asection != NULL + && dwarf2_per_objfile->info.s.section != NULL && !dwarf2_per_objfile->abbrev.is_virtual - && dwarf2_per_objfile->abbrev.s.asection != NULL); -Index: gdb-7.9.50.20150520/gdb/top.h + && dwarf2_per_objfile->abbrev.s.section != NULL); +Index: gdb-7.10.50.20151022/gdb/top.h =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/top.h 2015-05-31 16:34:58.448379751 +0200 -+++ gdb-7.9.50.20150520/gdb/top.h 2015-05-31 16:35:03.459416432 +0200 -@@ -67,6 +67,7 @@ extern void set_prompt (const char *s); +--- gdb-7.10.50.20151022.orig/gdb/top.h 2015-10-22 22:16:50.490482329 +0200 ++++ gdb-7.10.50.20151022/gdb/top.h 2015-10-22 22:28:22.047554171 +0200 +@@ -74,6 +74,7 @@ extern int gdb_in_secondary_prompt_p (vo /* From random places. */ extern int readnow_symbol_files; diff --git a/SOURCES/gdb-6.3-test-dtorfix-20050121.patch b/SOURCES/gdb-6.3-test-dtorfix-20050121.patch index a8a0266..24209ef 100644 --- a/SOURCES/gdb-6.3-test-dtorfix-20050121.patch +++ b/SOURCES/gdb-6.3-test-dtorfix-20050121.patch @@ -1,7 +1,7 @@ -Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc 2011-12-19 22:05:02.825431735 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc 2016-02-16 09:49:08.681886201 +0100 @@ -0,0 +1,99 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -102,10 +102,10 @@ Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.cc +{ + y = 2; /* First line D */ +} -Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp 2011-12-19 23:07:24.148290893 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp 2016-02-16 09:52:12.609130779 +0100 @@ -0,0 +1,130 @@ +# This testcase is part of GDB, the GNU debugger. + @@ -129,7 +129,7 @@ Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.cp/constructortest.exp + +set testfile "constructortest" +set srcfile ${testfile}.cc -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC +# breakpoints. +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } { diff --git a/SOURCES/gdb-6.3-test-movedir-20050125.patch b/SOURCES/gdb-6.3-test-movedir-20050125.patch index 4b05c13..fe23e7a 100644 --- a/SOURCES/gdb-6.3-test-movedir-20050125.patch +++ b/SOURCES/gdb-6.3-test-movedir-20050125.patch @@ -4,10 +4,10 @@ * gdb.base/move-dir.c: Ditto. * gdb.base/move-dir.h: Ditto. -Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c 2016-02-15 23:23:02.892499288 +0100 @@ -0,0 +1,10 @@ +#include +#include @@ -19,10 +19,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c + other(); +} + -Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp 2016-02-15 23:29:58.768461406 +0100 @@ -0,0 +1,57 @@ +# Copyright 2005 +# Free Software Foundation, Inc. @@ -44,17 +44,17 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp +set testfile "move-dir" +set srcfile ${testfile}.c +set incfile ${testfile}.h -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + -+set testdir "${objdir}/${subdir}/incdir" ++set testdir [standard_output_file incdir] + +remote_exec build "mkdir $testdir" -+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}" -+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}" ++remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]" ++remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]" + +set additional_flags "additional_flags=-I${subdir}/incdir" + -+if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } { ++if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + @@ -81,10 +81,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp + +set timeout $oldtimeout +return 0 -Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h 2016-02-15 23:23:02.892499288 +0100 @@ -0,0 +1,7 @@ +#include + diff --git a/SOURCES/gdb-6.3-test-pie-20050107.patch b/SOURCES/gdb-6.3-test-pie-20050107.patch index 9b72ff8..8074b5b 100644 --- a/SOURCES/gdb-6.3-test-pie-20050107.patch +++ b/SOURCES/gdb-6.3-test-pie-20050107.patch @@ -1,39 +1,7 @@ -Index: gdb-7.9.50.20150520/gdb/testsuite/configure.ac -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/testsuite/configure.ac 2015-05-31 16:34:02.396969450 +0200 -+++ gdb-7.9.50.20150520/gdb/testsuite/configure.ac 2015-05-31 16:34:33.443196711 +0200 -@@ -114,5 +114,5 @@ AC_OUTPUT([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.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ - gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) -Index: gdb-7.9.50.20150520/gdb/testsuite/configure -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/testsuite/configure 2015-05-31 16:33:53.154901798 +0200 -+++ gdb-7.9.50.20150520/gdb/testsuite/configure 2015-05-31 16:34:48.654308057 +0200 -@@ -3514,7 +3514,7 @@ program_transform_name=`$as_echo "$progr - ac_config_files="$ac_config_files lib/pdtrace" - - --ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" -+ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.btrace/Makefile gdb.cell/Makefile gdb.compile/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.dlang/Makefile gdb.fortran/Makefile gdb.gdb/Makefile gdb.go/Makefile gdb.server/Makefile gdb.java/Makefile gdb.guile/Makefile gdb.linespec/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile" - - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -4242,6 +4242,7 @@ do - "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; - "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;; - "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;; -+ "gdb.pie/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pie/Makefile" ;; - "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;; - "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;; - "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;; -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c 2015-05-31 16:34:02.398969465 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c 2016-02-15 23:23:02.843498936 +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 @@ -55,10 +23,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c + } + return 0; +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c 2015-05-31 16:34:02.398969465 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c 2016-02-15 23:23:02.843498936 +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 @@ -84,10 +52,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c + } + return (0); +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c 2016-02-15 23:23:02.844498943 +0100 @@ -0,0 +1,146 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -235,10 +203,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c + } + return 0; +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c 2016-02-15 23:23:02.844498943 +0100 @@ -0,0 +1,44 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -284,10 +252,10 @@ Index: gdb-7.9.50.20150520/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.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c 2016-02-15 23:23:02.844498943 +0100 @@ -0,0 +1,142 @@ +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 + Free Software Foundation, Inc. @@ -431,11 +399,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c + return 0; +} + -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp 2015-05-31 16:34:02.400969480 +0200 -@@ -0,0 +1,417 @@ ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp 2016-02-15 23:37:15.190560048 +0100 +@@ -0,0 +1,416 @@ +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -471,10 +439,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp +set testfile "attach" +set srcfile ${testfile}.c +set srcfile2 ${testfile}2.c -+set binfile ${objdir}/${subdir}/${testfile} -+set binfile2 ${objdir}/${subdir}/${testfile}2 -+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}] -+set cleanupfile ${objdir}/${subdir}/${testfile}.awk ++set binfile [standard_output_file ${testfile}] ++set binfile2 [standard_output_file ${testfile}2] ++set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]] ++set cleanupfile [standard_output_file ${testfile}.awk] + +#execute_anywhere "rm -f ${binfile} ${binfile2}" +remote_exec build "rm -f ${binfile} ${binfile2}" @@ -508,7 +476,6 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp + global escapedbinfile + global srcfile + global testfile -+ global objdir + global subdir + global timeout + @@ -716,7 +683,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp + # when we're cd'd to some directory that doesn't contain the + # a.out. (We use the source path set by the "dir" command.) + # -+ send_gdb "dir ${objdir}/${subdir}\n" ++ send_gdb "dir [file dirname [standard_output_file ${testfile}]]\n" + gdb_expect { + -re ".*Source directories searched: .*$gdb_prompt $"\ + {pass "set source path"} @@ -853,11 +820,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp +do_call_attach_tests + +return 0 -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp 2015-05-31 16:34:02.401969487 +0200 -@@ -0,0 +1,962 @@ ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp 2016-02-15 23:37:15.191560055 +0100 +@@ -0,0 +1,954 @@ +# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2002, 2003, 2004 +# Free Software Foundation, Inc. @@ -886,7 +853,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp +set testfile "break" +set srcfile ${testfile}.c +set srcfile1 ${testfile}1.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug "additional_flags=-w -fpie -pie"}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." @@ -1018,11 +985,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp + set main_line $bp_location6 +} + -+if {$hp_aCC_compiler} { -+ set proto "\\(int\\)" -+} else { -+ set proto "" -+} ++set proto "" + +set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] +set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] @@ -1359,14 +1322,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp + {fail "thread-specific breakpoint on non-existent thread disallowed"} + timeout {fail "(timeout) thread-specific breakpoint on non-existent thread disallowed"} +} -+send_gdb "break $bp_location12 thread foo\n" -+gdb_expect { -+ -re "Junk after thread keyword..*$gdb_prompt $"\ -+ {pass "thread-specific breakpoint on bogus thread ID disallowed"} -+ -re "$gdb_prompt $"\ -+ {fail "thread-specific breakpoint on bogus thread ID disallowed"} -+ timeout {fail "(timeout) thread-specific breakpoint on bogus thread ID disallowed"} -+} ++ ++gdb_test "break $bp_location12 thread foo" \ ++ "Invalid thread ID: foo" \ ++ "thread-specific breakpoint on bogus thread ID disallowed" + +# Verify that GDB responds gracefully to a breakpoint command with +# trailing garbage. @@ -1707,7 +1666,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp +# build a new file with optimization enabled so that we can try breakpoints +# on targets with optimized prologues + -+set binfileo2 ${objdir}/${subdir}/${testfile}o2 ++set binfileo2 [standard_output_file ${testfile}o2] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}O0.o" object {debug "additional_flags=-w -O2 -fpie -pie"}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." @@ -1820,10 +1779,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp + send_gdb "set args main\n" + gdb_expect -re ".*$gdb_prompt $" {} +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp 2015-05-31 16:34:02.401969487 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp 2016-02-15 23:37:15.191560055 +0100 @@ -0,0 +1,233 @@ +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. @@ -1851,7 +1810,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp + +set testfile "coremaker" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug "additional_flags=-fpie -pie"}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} @@ -1876,13 +1835,13 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp +# could have many core files lying around, and it may be difficult to +# tell which one is ours, so let's run the program in a subdirectory. +set found 0 -+set coredir "${objdir}/${subdir}/coredir.[getpid]" ++set coredir [standard_output_file coredir.[getpid]] +file mkdir $coredir +catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile}; true) >/dev/null 2>&1\"" +# remote_exec host "${binfile}" +foreach i "${coredir}/core ${coredir}/core.coremaker.c ${binfile}.core" { + if [remote_file build exists $i] { -+ remote_exec build "mv $i ${objdir}/${subdir}/corefile" ++ remote_exec build "mv $i [standard_output_file corefile]" + set found 1 + } +} @@ -1891,7 +1850,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp + set names [glob -nocomplain -directory $coredir core.*] + if {[llength $names] == 1} { + set corefile [file join $coredir [lindex $names 0]] -+ remote_exec build "mv $corefile ${objdir}/${subdir}/corefile" ++ remote_exec build "mv $corefile [standard_output_file corefile]" + set found 1 + } +} @@ -1901,10 +1860,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp + # ulimit here if we didn't find a core file above. + # Oh, I should mention that any "braindamaged" non-Unix system has + # the same problem. I like the cd bit too, it's really neat'n stuff. -+ catch "system \"(cd ${objdir}/${subdir}; ${binfile}; true) >/dev/null 2>&1\"" -+ foreach i "${objdir}/${subdir}/core ${objdir}/${subdir}/core.coremaker.c ${binfile}.core" { ++ catch "system \"(cd [file dirname [standard_output_file ${binfile}]]; ${binfile}; true) >/dev/null 2>&1\"" ++ foreach i "[standard_output_file core] [standard_output_file core.coremaker.c] ${binfile}.core" { + if [remote_file build exists $i] { -+ remote_exec build "mv $i ${objdir}/${subdir}/corefile" ++ remote_exec build "mv $i [standard_output_file corefile]" + set found 1 + } + } @@ -1937,13 +1896,13 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp + +gdb_exit +if $verbose>1 then { -+ send_user "Spawning $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile\n" ++ send_user "Spawning $GDB -nw $GDBFLAGS -core=[standard_output_file corefile]\n" +} + +set oldtimeout $timeout +set timeout [expr "$timeout + 60"] +verbose "Timeout is now $timeout seconds" 2 -+eval "spawn $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile" ++eval "spawn $GDB -nw $GDBFLAGS -core=[standard_output_file corefile]" +expect { + -re "Couldn't find .* registers in core file.*$gdb_prompt $" { + fail "args: -core=corefile (couldn't find regs)" @@ -1970,11 +1929,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp +close; + +if $verbose>1 then { -+ send_user "Spawning $GDB -nw $GDBFLAGS $binfile -core=$objdir/$subdir/corefile\n" ++ send_user "Spawning $GDB -nw $GDBFLAGS $binfile -core=[standard_output_file corefile]\n" +} + + -+eval "spawn $GDB -nw $GDBFLAGS $binfile -core=$objdir/$subdir/corefile"; ++eval "spawn $GDB -nw $GDBFLAGS $binfile -core=[standard_output_file corefile]"; +expect { + -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { + pass "args: execfile -core=corefile" @@ -2001,7 +1960,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp + +# Test basic corefile recognition via core-file command. + -+send_gdb "core-file $objdir/$subdir/corefile\n" ++send_gdb "core-file [standard_output_file corefile]\n" +gdb_expect { + -re ".* program is being debugged already.*y or n. $" { + # gdb_load may connect us to a gdbserver. @@ -2058,27 +2017,3 @@ Index: gdb-7.9.50.20150520/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.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in 2015-05-31 16:34:02.401969487 +0200 -@@ -0,0 +1,19 @@ -+VPATH = @srcdir@ -+srcdir = @srcdir@ -+ -+EXECUTABLES = -+MISCELLANEOUS = arch.inc -+ -+all info install-info dvi install uninstall installcheck check: -+ @echo "Nothing to be done for $@..." -+ -+clean mostlyclean: -+ -rm -f *~ *.o a.out *.x *.ci *.tmp -+ -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES) -+ -rm -f $(MISCELLANEOUS) -+ -+distclean maintainer-clean realclean: clean -+ -rm -f *~ core -+ -rm -f Makefile config.status config.log -+ -rm -f *-init.exp -+ -rm -fr *.log summary detail *.plog *.sum *.psum site.* diff --git a/SOURCES/gdb-6.3-threaded-watchpoints2-20050225.patch b/SOURCES/gdb-6.3-threaded-watchpoints2-20050225.patch index a24c448..16933bf 100644 --- a/SOURCES/gdb-6.3-threaded-watchpoints2-20050225.patch +++ b/SOURCES/gdb-6.3-threaded-watchpoints2-20050225.patch @@ -42,10 +42,10 @@ FIXME: The testcase does not expects multiple watchpoints hits per one stop. -Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2011-12-19 22:05:02.867431570 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2016-02-15 23:37:39.766734541 +0100 @@ -0,0 +1,66 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -113,10 +113,10 @@ Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.c + pthread_exit(NULL); +} + -Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2011-12-19 22:28:33.294911982 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2016-02-15 23:40:32.484960858 +0100 @@ -0,0 +1,126 @@ +# This testcase is part of GDB, the GNU debugger. + @@ -146,7 +146,7 @@ Index: gdb-7.4.50.20111219/gdb/testsuite/gdb.threads/watchthreads-threaded.exp + +set testfile "watchthreads-threaded" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } { + return -1 +} diff --git a/SOURCES/gdb-6.5-BEA-testsuite.patch b/SOURCES/gdb-6.5-BEA-testsuite.patch index b338bf7..5771f97 100644 --- a/SOURCES/gdb-6.5-BEA-testsuite.patch +++ b/SOURCES/gdb-6.5-BEA-testsuite.patch @@ -1,7 +1,7 @@ -Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.c 2013-05-21 13:35:45.592059786 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c 2016-02-15 23:37:39.884735379 +0100 @@ -0,0 +1,301 @@ +/* + * The point of this program is to crash in a multi-threaded app. @@ -304,10 +304,10 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.c + + return 0; +} -Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp 2013-05-21 13:36:01.451056746 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp 2016-02-15 23:38:58.486293458 +0100 @@ -0,0 +1,37 @@ +# threadcrash.exp - The point of this program is to crash in a multi-threaded app. + @@ -315,7 +315,7 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp +set testfile threadcrash +set srcfile ${testfile}.c +set shellfile ${srcdir}/${subdir}/${testfile}.sh -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +set GDB_abs ${GDB} +if [regexp "^\[^/\]" ${GDB_abs}] { @@ -346,10 +346,10 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.exp +} + +return 0 -Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh 2013-05-21 13:35:45.593059786 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh 2016-02-15 23:37:39.885735386 +0100 @@ -0,0 +1,324 @@ +#! /bin/bash + @@ -675,10 +675,10 @@ Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh +rm -rf $WORKDIR + +exit $FAILURES -Index: gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh-orig +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6/gdb/testsuite/gdb.threads/threadcrash.sh-orig 2013-05-21 13:35:45.593059786 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig 2016-02-15 23:37:39.885735386 +0100 @@ -0,0 +1,248 @@ +#! /bin/bash + diff --git a/SOURCES/gdb-6.5-bz109921-DW_AT_decl_file-test.patch b/SOURCES/gdb-6.5-bz109921-DW_AT_decl_file-test.patch index 70be875..88224c4 100644 --- a/SOURCES/gdb-6.5-bz109921-DW_AT_decl_file-test.patch +++ b/SOURCES/gdb-6.5-bz109921-DW_AT_decl_file-test.patch @@ -16,8 +16,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html * gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c, gdb.dwarf2/dw2-included.h: New files. ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c 2 Jan 2007 00:20:27 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c 2016-02-16 09:52:29.861247534 +0100 @@ -0,0 +1,26 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -45,8 +47,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html +{ + return 0; +} ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.exp 2 Jan 2007 00:20:27 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp 2016-02-16 09:52:36.481292330 +0100 @@ -0,0 +1,47 @@ +# Copyright 2006 Free Software Foundation, Inc. + @@ -79,7 +83,7 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html + +set testfile "dw2-included" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + return -1 @@ -95,8 +99,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html +gdb_test "ptype integer" "type = int\r" +# Path varies depending on the build location. +gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r" ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.h 2 Jan 2007 00:20:27 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h 2016-02-16 09:52:29.862247541 +0100 @@ -0,0 +1,20 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index 7cb307a..d8c1982 100644 --- a/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/SOURCES/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -34,11 +34,11 @@ 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.8.1/gdb/printcmd.c +Index: gdb-7.10.90.20160211/gdb/printcmd.c =================================================================== ---- 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 +--- gdb-7.10.90.20160211.orig/gdb/printcmd.c 2016-02-15 23:29:53.062420893 +0100 ++++ gdb-7.10.90.20160211/gdb/printcmd.c 2016-02-15 23:33:31.068968762 +0100 +@@ -1003,6 +1003,10 @@ if (exp && *exp) { @@ -49,10 +49,10 @@ Index: gdb-7.8.1/gdb/printcmd.c expr = parse_expression (exp); make_cleanup (free_current_contents, &expr); val = evaluate_expression (expr); -Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2014-11-21 19:05:44.869959291 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2016-02-15 23:30:20.703617148 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -82,10 +82,10 @@ Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.c + + return 0; /* breakpoint */ +} -Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2014-11-21 19:05:44.869959291 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2016-02-15 23:35:25.582781821 +0100 @@ -0,0 +1,60 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -104,7 +104,7 @@ Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno.exp + +set testfile dw2-errno +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +proc prep {} { + global srcdir subdir binfile @@ -147,10 +147,10 @@ Index: gdb-7.8.1/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 +Index: gdb-7.10.90.20160211/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 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2016-02-15 23:30:20.703617148 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -180,10 +180,10 @@ Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.c + + return 0; /* breakpoint */ +} -Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp +Index: gdb-7.10.90.20160211/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 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2016-02-15 23:35:25.582781821 +0100 @@ -0,0 +1,71 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -202,7 +202,7 @@ Index: gdb-7.8.1/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp + +set testfile dw2-errno2 +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +proc prep { message {do_xfail 0} } { with_test_prefix $message { + global srcdir subdir binfile variant diff --git a/SOURCES/gdb-6.5-bz216711-clone-is-outermost.patch b/SOURCES/gdb-6.5-bz216711-clone-is-outermost.patch index a2c4b8f..657eeb4 100644 --- a/SOURCES/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/SOURCES/gdb-6.5-bz216711-clone-is-outermost.patch @@ -23,11 +23,11 @@ instead. Port to GDB-6.7. -Index: gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c +Index: gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c =================================================================== ---- 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 +--- gdb-7.10.90.20160211.orig/gdb/amd64-linux-tdep.c 2016-02-15 23:37:06.936501443 +0100 ++++ gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c 2016-02-15 23:37:39.928735691 +0100 +@@ -292,6 +292,80 @@ /* Set the program counter for process PTID to PC. */ @@ -108,7 +108,7 @@ Index: gdb-7.8.50.20141228/gdb/amd64-linux-tdep.c static void amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc) { -@@ -1657,6 +1731,8 @@ amd64_linux_init_abi_common(struct gdbar +@@ -1800,6 +1874,8 @@ tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET; @@ -117,11 +117,11 @@ Index: gdb-7.8.50.20141228/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.8.50.20141228/gdb/amd64-tdep.c +Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c =================================================================== ---- 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 +--- gdb-7.10.90.20160211.orig/gdb/amd64-tdep.c 2016-02-15 23:37:06.936501443 +0100 ++++ gdb-7.10.90.20160211/gdb/amd64-tdep.c 2016-02-15 23:37:39.929735698 +0100 +@@ -2494,6 +2494,7 @@ { struct amd64_frame_cache *cache = amd64_frame_cache (this_frame, this_cache); @@ -129,7 +129,7 @@ Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c if (!cache->base_p) return UNWIND_UNAVAILABLE; -@@ -2500,6 +2501,10 @@ amd64_frame_unwind_stop_reason (struct f +@@ -2502,6 +2503,10 @@ if (cache->base == 0) return UNWIND_OUTERMOST; @@ -140,7 +140,7 @@ Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c return UNWIND_NO_REASON; } -@@ -2631,6 +2636,7 @@ amd64_sigtramp_frame_this_id (struct fra +@@ -2636,6 +2641,7 @@ { struct amd64_frame_cache *cache = amd64_sigtramp_frame_cache (this_frame, this_cache); @@ -148,7 +148,7 @@ Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c if (!cache->base_p) (*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame)); -@@ -2639,6 +2645,11 @@ amd64_sigtramp_frame_this_id (struct fra +@@ -2644,6 +2650,11 @@ /* This marks the outermost frame. */ return; } @@ -160,11 +160,11 @@ Index: gdb-7.8.50.20141228/gdb/amd64-tdep.c else (*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame)); } -Index: gdb-7.8.50.20141228/gdb/i386-tdep.c +Index: gdb-7.10.90.20160211/gdb/i386-tdep.c =================================================================== ---- 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 +--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.c 2016-02-15 23:37:06.936501443 +0100 ++++ gdb-7.10.90.20160211/gdb/i386-tdep.c 2016-02-15 23:37:39.931735713 +0100 +@@ -8305,6 +8305,9 @@ tdep->xsave_xcr0_offset = -1; @@ -174,11 +174,11 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.c tdep->record_regmap = i386_record_regmap; set_gdbarch_long_long_align_bit (gdbarch, 32); -Index: gdb-7.8.50.20141228/gdb/i386-tdep.h +Index: gdb-7.10.90.20160211/gdb/i386-tdep.h =================================================================== ---- 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 +--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.h 2016-02-15 23:37:06.936501443 +0100 ++++ gdb-7.10.90.20160211/gdb/i386-tdep.h 2016-02-15 23:37:39.932735720 +0100 +@@ -240,6 +240,9 @@ /* Regsets. */ const struct regset *fpregset; @@ -188,10 +188,10 @@ Index: gdb-7.8.50.20141228/gdb/i386-tdep.h }; /* Floating-point registers. */ -Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c 2015-01-01 17:01:54.773854347 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c 2016-02-15 23:37:39.932735720 +0100 @@ -0,0 +1,39 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -232,10 +232,10 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.c + for (;;) + pause(); +} -Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2015-01-01 17:01:54.774854346 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2016-02-15 23:37:56.197851204 +0100 @@ -0,0 +1,61 @@ +# Copyright 2006 Free Software Foundation, Inc. + @@ -261,7 +261,7 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp + +set testfile bt-clone-stop +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -278,7 +278,7 @@ Index: gdb-7.8.50.20141228/gdb/testsuite/gdb.threads/bt-clone-stop.exp +# Program received signal SIGABRT, Aborted. + +gdb_test "run" \ -+ "Program received signal SIGABRT.*" \ ++ {Thread 2 "bt-clone-stop" received signal SIGABRT.*} \ + "run" + +# Former gdb unwind (the first function is `clone'): diff --git a/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch b/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch index bb6f3f1..950a80b 100644 --- a/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +++ b/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch @@ -1,8 +1,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 ---- /dev/null 2006-12-17 14:18:21.881669220 -0500 -+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp 2006-12-17 16:52:51.000000000 -0500 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp 2016-02-15 23:31:47.312232078 +0100 @@ -0,0 +1,54 @@ +# Copyright 2006 Free Software Foundation, Inc. + @@ -26,7 +28,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 + +set testfile step-over-trampoline +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -58,8 +60,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379 + fail "stepped into trampoline" + } +} ---- /dev/null 2006-12-17 14:18:21.881669220 -0500 -+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c 2006-12-17 16:18:12.000000000 -0500 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c 2016-02-15 23:30:54.698858518 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch b/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch index dad4833..601564d 100644 --- a/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch +++ b/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch @@ -1,6 +1,7 @@ -diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c ---- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2008-01-08 11:25:45.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2016-02-15 23:28:15.943731340 +0100 @@ -0,0 +1,37 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -39,9 +40,10 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore + + return 0; +} -diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp ---- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2008-01-08 11:47:32.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2016-02-15 23:28:22.720779458 +0100 @@ -0,0 +1,94 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -61,9 +63,9 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore + +set testfile gcore-excessive-memory +set srcfile ${testfile}.c -+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh -+set corefile ${objdir}/${subdir}/${testfile}.core -+set binfile ${objdir}/${subdir}/${testfile} ++set shfile [standard_output_file ${testfile}-gdb.sh] ++set corefile [standard_output_file ${testfile}.core] ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 diff --git a/SOURCES/gdb-6.5-ia64-libunwind-leak-test.patch b/SOURCES/gdb-6.5-ia64-libunwind-leak-test.patch index c77c677..0173d91 100644 --- a/SOURCES/gdb-6.5-ia64-libunwind-leak-test.patch +++ b/SOURCES/gdb-6.5-ia64-libunwind-leak-test.patch @@ -1,6 +1,7 @@ -diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c ---- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 15:12:55.000000000 -0500 -+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 13:55:22.000000000 -0500 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c 2016-02-15 23:32:11.307402446 +0100 @@ -0,0 +1,29 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -31,9 +32,10 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/tests + alarm (0); + return 0; +} -diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp ---- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:12:53.000000000 -0500 -+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:11:35.000000000 -0500 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp 2016-02-15 23:32:18.559453937 +0100 @@ -0,0 +1,83 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -53,8 +55,8 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/tes + +set testfile unwind-leak +set srcfile ${testfile}.c -+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh -+set binfile ${objdir}/${subdir}/${testfile} ++set shfile [standard_output_file ${testfile}-gdb.sh] ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 diff --git a/SOURCES/gdb-6.5-missed-trap-on-step-test.patch b/SOURCES/gdb-6.5-missed-trap-on-step-test.patch index 2f4436d..8256895 100644 --- a/SOURCES/gdb-6.5-missed-trap-on-step-test.patch +++ b/SOURCES/gdb-6.5-missed-trap-on-step-test.patch @@ -1,8 +1,10 @@ Fix has been committed to: gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch ---- /dev/null 2007-12-14 20:45:09.113039517 +0100 -+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2007-12-24 19:42:00.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2016-02-15 23:34:10.455248408 +0100 @@ -0,0 +1,44 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -22,7 +24,7 @@ Fix has been committed to: + +set testfile watchpoint-during-step +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -48,8 +50,10 @@ Fix has been committed to: +# we step from as in this case it is a valid upstream KFAIL gdb/38 + +gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint" ---- /dev/null 2007-12-14 20:45:09.113039517 +0100 -+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.c 2007-12-24 19:38:10.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c 2016-02-15 23:32:51.846690279 +0100 @@ -0,0 +1,30 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/SOURCES/gdb-6.5-readline-long-line-crash-test.patch b/SOURCES/gdb-6.5-readline-long-line-crash-test.patch index 86a82a4..a7dd3e3 100644 --- a/SOURCES/gdb-6.5-readline-long-line-crash-test.patch +++ b/SOURCES/gdb-6.5-readline-long-line-crash-test.patch @@ -1,13 +1,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196 -Index: ./gdb/testsuite/gdb.base/readline-overflow.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp =================================================================== -RCS file: ./gdb/testsuite/gdb.base/readline-overflow.exp -diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/readline-overflow.exp 13 Nov 2006 23:42:50 -0000 -@@ -0,0 +1,125 @@ +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp 2016-02-15 23:30:29.191677414 +0100 +@@ -0,0 +1,126 @@ +# Copyright 2006 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -110,7 +108,8 @@ diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp + gdb_clear_suppressed + } +} -+gdb_test "\r" \ ++send_gdb "\r" ++gdb_test "" \ + "No executable file specified..*" \ + "All the characters transferred" + @@ -133,4 +132,3 @@ diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp +} +set timeout $oldtimeout1 + -+return 0 diff --git a/SOURCES/gdb-6.5-section-num-fixup-test.patch b/SOURCES/gdb-6.5-section-num-fixup-test.patch index 53f7fec..4b3ca94 100644 --- a/SOURCES/gdb-6.5-section-num-fixup-test.patch +++ b/SOURCES/gdb-6.5-section-num-fixup-test.patch @@ -1,6 +1,7 @@ -diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c ---- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c 1969-12-31 19:00:00.000000000 -0500 -+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c 2008-05-29 13:51:50.000000000 -0400 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c 2016-02-15 23:27:19.654331680 +0100 @@ -0,0 +1,22 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -24,9 +25,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/tes + bug-gdb@prep.ai.mit.edu */ + +int var; -diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c ---- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c 1969-12-31 19:00:00.000000000 -0500 -+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c 2008-05-29 13:51:39.000000000 -0400 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c 2016-02-15 23:27:19.654331680 +0100 @@ -0,0 +1,26 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -54,9 +56,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/te +{ + return 0; +} -diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/testsuite/gdb.base/datalib.exp ---- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp 1969-12-31 19:00:00.000000000 -0500 -+++ gdb-6.5/gdb/testsuite/gdb.base/datalib.exp 2008-05-29 14:58:33.000000000 -0400 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp 2016-02-15 23:27:25.968376510 +0100 @@ -0,0 +1,51 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -77,8 +80,8 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/tests +set testfile datalib +set srcfilemain ${testfile}-main.c +set srcfilelib ${testfile}-lib.c -+set libfile ${objdir}/${subdir}/${testfile}-lib.so -+set binfile ${objdir}/${subdir}/${testfile}-main ++set libfile [standard_output_file ${testfile}-lib.so] ++set binfile [standard_output_file ${testfile}-main] +if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } { + untested "Couldn't compile test program" + return -1 diff --git a/SOURCES/gdb-6.5-sharedlibrary-path.patch b/SOURCES/gdb-6.5-sharedlibrary-path.patch index 3e0c101..45a1878 100644 --- a/SOURCES/gdb-6.5-sharedlibrary-path.patch +++ b/SOURCES/gdb-6.5-sharedlibrary-path.patch @@ -23,10 +23,10 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'. Port to gdb-6.7.50.20080227. -Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2008-02-27 09:00:15.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2016-02-16 10:16:12.629875073 +0100 @@ -0,0 +1,25 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -53,10 +53,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c +{ + return 0; +} -Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2008-02-27 09:00:15.000000000 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2016-02-16 10:16:12.630875080 +0100 @@ -0,0 +1,22 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -80,9 +80,11 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c + bug-gdb@prep.ai.mit.edu */ + +__thread int var = 42; ---- /dev/null 2009-02-10 00:19:00.494289687 +0100 -+++ gdb-6.8.50.20090209-x/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-02-10 00:49:38.000000000 +0100 -@@ -0,0 +1,86 @@ +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2016-02-16 10:16:31.241001010 +0100 +@@ -0,0 +1,87 @@ +# Copyright 2006 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -107,10 +109,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c +set srcmainfile ${testfile}-main.c +set srcsharedfile ${testfile}-shared.c + -+set binmainfile ${objdir}/${subdir}/${testfile}-main ++set binmainfile [standard_output_file ${testfile}-main] +set binsharedbase ${testfile}-shared.so -+set binsharedfile ${objdir}/${subdir}/${binsharedbase} -+set binshareddebugfile ${objdir}/${subdir}/${binsharedbase}.debug ++set binsharedfile [standard_output_file ${binsharedbase}] ++set binshareddebugfile [standard_output_file ${binsharedbase}.debug] + +# Use explicit -soname as otherwise the full path to the library would get +# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless. @@ -144,7 +146,8 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c +# \$PWD is easy - it is the absolute way +# ${subdir} would fail on "print var" + -+foreach ld_library_path [list [pwd]/${subdir} ./${subdir}] name { absolute relative } { ++set absdir [file dirname [standard_output_file ${binsharedbase}]] ++foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] name { absolute relative } { + + gdb_exit + gdb_start diff --git a/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch index b3750cd..64fe1d0 100644 --- a/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +++ b/SOURCES/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch @@ -15,10 +15,10 @@ Comments by Sergio Durigan Junior : NULL after it is free'd, otherwise the code below thinks that it is still valid and doesn't print the necessary warning ("Try: yum install ..."). -Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2015-07-09 22:22:26.278304653 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2016-02-15 23:31:06.327941085 +0100 @@ -0,0 +1,97 @@ +# Copyright (C) 2014 Free Software Foundation, Inc. + @@ -51,9 +51,9 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst +} + +# We first need to generate a corefile -+set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test] ++set escapedfilename [string_to_regexp [standard_output_file gcore.test]] +set core_supported 0 -+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \ ++gdb_test_multiple "gcore [standard_output_file gcore.test]" \ + "save a corefile" \ +{ + -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" { @@ -84,19 +84,19 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst + gdb_test "set build-id-verbose 1" "" \ + "set build-id-verbose" + -+ gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \ ++ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \ + "set debug-file-directory" + -+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \ -+ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \ ++ gdb_test "core-file [standard_output_file gcore.test]" \ ++ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install [standard_output_file $build_id_without_debug]\r\n.*" \ + "test first yum/dnf warning" +} + +# Now we define and create our .build-id -+file mkdir [file dirname ${objdir}/${subdir}/${build_id_without_debug}] ++file mkdir [file dirname [standard_output_file ${build_id_without_debug}]] +# Cannot use "file link" (from TCL) because it requires the target file to +# exist. -+remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}" ++remote_exec build "ln -s $binfile [standard_output_file ${build_id_without_debug}]" + +# Reinitialize GDB to get the second yum/dnf warning +gdb_exit @@ -107,21 +107,21 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst + gdb_test "set build-id-verbose 1" "" \ + "set build-id-verbose" + -+ gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \ ++ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \ + "set debug-file-directory" + -+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \ ++ gdb_test "core-file [standard_output_file gcore.test]" \ + "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \ + "test second yum/dnf warning" +} + +# Leaving the link there will cause breakage in the next run. -+remote_exec build "rm -f ${objdir}/${subdir}/${build_id_without_debug}" -Index: gdb-7.9.90.20150709/gdb/build-id.c ++remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]" +Index: gdb-7.10.90.20160211/gdb/build-id.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/build-id.c 2015-07-09 22:22:26.278304653 +0200 -+++ gdb-7.9.90.20150709/gdb/build-id.c 2015-07-09 22:22:51.398502329 +0200 -@@ -589,7 +589,10 @@ build_id_to_debug_bfd (size_t build_id_l +--- gdb-7.10.90.20160211.orig/gdb/build-id.c 2016-02-15 23:30:55.389863424 +0100 ++++ gdb-7.10.90.20160211/gdb/build-id.c 2016-02-15 23:30:55.778866186 +0100 +@@ -589,7 +589,10 @@ do_cleanups (inner); if (abfd == NULL) diff --git a/SOURCES/gdb-6.6-buildid-locate-rpm-scl.patch b/SOURCES/gdb-6.6-buildid-locate-rpm-scl.patch index d5533e8..f2f605d 100644 --- a/SOURCES/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/SOURCES/gdb-6.6-buildid-locate-rpm-scl.patch @@ -1,60 +1,38 @@ warning: Skipping deprecated .gdb_index section https://bugzilla.redhat.com/show_bug.cgi?id=953585 -Index: gdb-7.6.90.20140127/gdb/dwarf2read.c -=================================================================== ---- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:28:23.756232026 +0100 -+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:28:48.969259122 +0100 -@@ -3035,6 +3035,14 @@ read_index_from_section (struct objfile - "set use-deprecated-index-sections on". */ - if (version < 6 && !deprecated_ok) - { -+ extern int rpm_verify_vendor (const char *filename); -+ -+ /* Red Hat Developer Toolset exception. */ -+ if (rpm_verify_vendor (filename)) -+ {} -+ else -+ { -+ - static int warning_printed = 0; - if (!warning_printed) - { -@@ -3046,6 +3054,8 @@ to use the section anyway."), - warning_printed = 1; - } - return 0; -+ -+ } - } - /* Version 7 indices generated by gold refer to the CU for a symbol instead - of the TU (for symbols coming from TUs), -Index: gdb-7.6.90.20140127/gdb/build-id.c -=================================================================== ---- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 18:28:23.758232029 +0100 -+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 18:28:26.814235312 +0100 -@@ -711,7 +711,7 @@ static int missing_rpm_list_entries; +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb/build-id.c +--- gdb-7.10.50.20160106-orig/gdb/build-id.c 2016-01-09 14:40:39.420385241 +0100 ++++ gdb-7.10.50.20160106/gdb/build-id.c 2016-01-09 14:41:05.944549393 +0100 +@@ -713,7 +713,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int --missing_rpm_enlist (const char *filename) ++#ifndef GDB_INDEX_VERIFY_VENDOR + missing_rpm_enlist (const char *filename) ++#else +missing_rpm_enlist_1 (const char *filename, int verify_vendor) ++#endif { static int rpm_init_done = 0; rpmts ts; -@@ -815,7 +815,7 @@ missing_rpm_enlist (const char *filename +@@ -817,7 +821,11 @@ missing_rpm_enlist (const char *filename mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { -- for (;;) ++#ifndef GDB_INDEX_VERIFY_VENDOR + for (;;) ++#else + if (!verify_vendor) for (;;) ++#endif { Header h; char *debuginfo, **slot, *s, *s2; -@@ -933,6 +933,35 @@ missing_rpm_enlist (const char *filename +@@ -935,6 +943,37 @@ missing_rpm_enlist (const char *filename xfree (debuginfo); count++; } ++#ifdef GDB_INDEX_VERIFY_VENDOR + else /* verify_vendor */ + { + int vendor_pass = 0, vendor_fail = 0; @@ -84,13 +62,15 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c + } + count = vendor_pass != 0 && vendor_fail == 0; + } ++#endif rpmdbFreeIterator_p (mi); } -@@ -943,6 +972,19 @@ missing_rpm_enlist (const char *filename +@@ -945,6 +984,21 @@ missing_rpm_enlist (const char *filename } static int ++#ifdef GDB_INDEX_VERIFY_VENDOR +missing_rpm_enlist (const char *filename) +{ + return missing_rpm_enlist_1 (filename, 0); @@ -104,6 +84,38 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c +} + +static int ++#endif missing_rpm_list_compar (const char *const *ap, const char *const *bp) { return strcoll (*ap, *bp); +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/gdb/dwarf2read.c +--- gdb-7.10.50.20160106-orig/gdb/dwarf2read.c 2016-01-09 14:40:39.416385216 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-09 14:41:05.942549381 +0100 +@@ -3111,6 +3111,16 @@ read_index_from_section (struct objfile + "set use-deprecated-index-sections on". */ + if (version < 6 && !deprecated_ok) + { ++#ifdef GDB_INDEX_VERIFY_VENDOR ++ extern int rpm_verify_vendor (const char *filename); ++ ++ /* Red Hat Developer Toolset exception. */ ++ if (rpm_verify_vendor (filename)) ++ {} ++ else ++ { ++ ++#endif + static int warning_printed = 0; + if (!warning_printed) + { +@@ -3122,6 +3132,10 @@ to use the section anyway."), + warning_printed = 1; + } + return 0; ++#ifdef GDB_INDEX_VERIFY_VENDOR ++ ++ } ++#endif + } + /* Version 7 indices generated by gold refer to the CU for a symbol instead + of the TU (for symbols coming from TUs), diff --git a/SOURCES/gdb-6.6-buildid-locate-rpm.patch b/SOURCES/gdb-6.6-buildid-locate-rpm.patch index 9e850dd..5efcc5a 100644 --- a/SOURCES/gdb-6.6-buildid-locate-rpm.patch +++ b/SOURCES/gdb-6.6-buildid-locate-rpm.patch @@ -1,7 +1,7 @@ -Index: gdb-7.9.90.20150717/gdb/event-top.c +Index: gdb-7.10.50.20160106/gdb/event-top.c =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/event-top.c 2015-07-17 03:59:12.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/event-top.c 2015-08-01 20:07:15.822993674 +0200 +--- gdb-7.10.50.20160106.orig/gdb/event-top.c ++++ gdb-7.10.50.20160106/gdb/event-top.c @@ -37,6 +37,7 @@ #include "gdbcmd.h" /* for dont_repeat() */ #include "annotate.h" @@ -28,10 +28,10 @@ Index: gdb-7.9.90.20150717/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.9.90.20150717/gdb/symfile.h +Index: gdb-7.10.50.20160106/gdb/symfile.h =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/symfile.h 2015-08-01 20:07:15.787993404 +0200 -+++ gdb-7.9.90.20150717/gdb/symfile.h 2015-08-01 20:07:15.822993674 +0200 +--- gdb-7.10.50.20160106.orig/gdb/symfile.h ++++ gdb-7.10.50.20160106/gdb/symfile.h @@ -587,6 +587,8 @@ void map_symbol_filenames (symbol_filena /* build-id support. */ extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); @@ -41,11 +41,11 @@ Index: gdb-7.9.90.20150717/gdb/symfile.h /* From dwarf2read.c */ -Index: gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.789993420 +0200 -+++ gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.824993689 +0200 -@@ -1573,7 +1573,7 @@ proc default_gdb_start { } { +--- gdb-7.10.50.20160106.orig/gdb/testsuite/lib/gdb.exp ++++ gdb-7.10.50.20160106/gdb/testsuite/lib/gdb.exp +@@ -1642,7 +1642,7 @@ proc default_gdb_start { } { warning "Couldn't set the width to 0." } } @@ -54,11 +54,11 @@ Index: gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp send_gdb "set build-id-verbose 0\n" gdb_expect 10 { -re "$gdb_prompt $" { -Index: gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.789993420 +0200 -+++ gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.824993689 +0200 -@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } { +--- gdb-7.10.50.20160106.orig/gdb/testsuite/lib/mi-support.exp ++++ gdb-7.10.50.20160106/gdb/testsuite/lib/mi-support.exp +@@ -204,7 +204,7 @@ proc default_mi_gdb_start { args } { warning "Couldn't set the width to 0." } } @@ -67,10 +67,10 @@ Index: gdb-7.9.90.20150717/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.9.90.20150717/gdb/tui/tui-interp.c +Index: gdb-7.10.50.20160106/gdb/tui/tui-interp.c =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/tui/tui-interp.c 2015-07-17 03:59:13.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/tui/tui-interp.c 2015-08-01 20:07:15.825993697 +0200 +--- gdb-7.10.50.20160106.orig/gdb/tui/tui-interp.c ++++ gdb-7.10.50.20160106/gdb/tui/tui-interp.c @@ -31,6 +31,7 @@ #include "tui/tui-io.h" #include "infrun.h" @@ -79,10 +79,10 @@ Index: gdb-7.9.90.20150717/gdb/tui/tui-interp.c static struct ui_out *tui_ui_out (struct interp *self); -Index: gdb-7.9.90.20150717/gdb/aclocal.m4 +Index: gdb-7.10.50.20160106/gdb/aclocal.m4 =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/aclocal.m4 2015-07-17 03:59:12.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/aclocal.m4 2015-08-01 20:07:15.825993697 +0200 +--- gdb-7.10.50.20160106.orig/gdb/aclocal.m4 ++++ gdb-7.10.50.20160106/gdb/aclocal.m4 @@ -11,6 +11,221 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @@ -305,10 +305,10 @@ Index: gdb-7.9.90.20150717/gdb/aclocal.m4 # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -Index: gdb-7.9.90.20150717/gdb/config.in +Index: gdb-7.10.50.20160106/gdb/config.in =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/config.in 2015-07-17 03:59:12.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/config.in 2015-08-01 20:07:15.826993704 +0200 +--- gdb-7.10.50.20160106.orig/gdb/config.in ++++ gdb-7.10.50.20160106/gdb/config.in @@ -33,6 +33,9 @@ /* Define to BFD's default target vector. */ #undef DEFAULT_BFD_VEC @@ -329,11 +329,11 @@ Index: gdb-7.9.90.20150717/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -Index: gdb-7.9.90.20150717/gdb/configure +Index: gdb-7.10.50.20160106/gdb/configure =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/configure 2015-07-17 03:59:12.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/configure 2015-08-01 20:07:15.830993735 +0200 -@@ -703,6 +703,11 @@ PKGVERSION +--- gdb-7.10.50.20160106.orig/gdb/configure ++++ gdb-7.10.50.20160106/gdb/configure +@@ -705,6 +705,11 @@ PKGVERSION HAVE_NATIVE_GCORE_TARGET TARGET_OBS subdirs @@ -345,7 +345,7 @@ Index: gdb-7.9.90.20150717/gdb/configure GDB_DATADIR DEBUGDIR MAKEINFO_EXTRA_FLAGS -@@ -811,6 +816,7 @@ with_gdb_datadir +@@ -813,6 +818,7 @@ with_gdb_datadir with_relocated_sources with_auto_load_dir with_auto_load_safe_path @@ -353,7 +353,7 @@ Index: gdb-7.9.90.20150717/gdb/configure enable_targets enable_64_bit_bfd enable_gdbcli -@@ -867,6 +873,11 @@ CCC +@@ -869,6 +875,11 @@ CCC CPP MAKEINFO MAKEINFOFLAGS @@ -365,7 +365,7 @@ Index: gdb-7.9.90.20150717/gdb/configure YACC YFLAGS XMKMF' -@@ -1538,6 +1549,8 @@ Optional Packages: +@@ -1540,6 +1551,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.9.90.20150717/gdb/configure --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-curses use the curses library instead of the termcap library -@@ -1592,6 +1605,13 @@ Some influential environment variables: +@@ -1595,6 +1608,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.9.90.20150717/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. -@@ -5608,6 +5628,491 @@ _ACEOF +@@ -5655,6 +5675,494 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 $as_echo "$with_auto_load_safe_path" >&6; } @@ -623,6 +623,7 @@ Index: gdb-7.9.90.20150717/gdb/configure + + + ++ +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -751,6 +752,7 @@ Index: gdb-7.9.90.20150717/gdb/configure + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi @@ -767,6 +769,7 @@ Index: gdb-7.9.90.20150717/gdb/configure + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi @@ -786,9 +789,9 @@ Index: gdb-7.9.90.20150717/gdb/configure + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then -+ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rpm" 2>&1` ++ RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rpm" 2>&1` + else -+ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors "rpm" 2>&1` ++ RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rpm" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$RPM_PKG_ERRORS" >&5 @@ -880,10 +883,10 @@ Index: gdb-7.9.90.20150717/gdb/configure subdirs="$subdirs testsuite" -Index: gdb-7.9.90.20150717/gdb/configure.ac +Index: gdb-7.10.50.20160106/gdb/configure.ac =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/configure.ac 2015-07-17 03:59:12.000000000 +0200 -+++ gdb-7.9.90.20150717/gdb/configure.ac 2015-08-01 20:07:15.831993743 +0200 +--- gdb-7.10.50.20160106.orig/gdb/configure.ac ++++ gdb-7.10.50.20160106/gdb/configure.ac @@ -177,6 +177,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,10 +1087,10 @@ Index: gdb-7.9.90.20150717/gdb/configure.ac AC_CONFIG_SUBDIRS(testsuite) # Check whether to support alternative target configurations -Index: gdb-7.9.90.20150717/gdb/corelow.c +Index: gdb-7.10.50.20160106/gdb/corelow.c =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/corelow.c 2015-08-01 20:07:15.775993312 +0200 -+++ gdb-7.9.90.20150717/gdb/corelow.c 2015-08-01 20:07:15.831993743 +0200 +--- gdb-7.10.50.20160106.orig/gdb/corelow.c ++++ gdb-7.10.50.20160106/gdb/corelow.c @@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } @@ -1097,10 +1100,10 @@ Index: gdb-7.9.90.20150717/gdb/corelow.c do_cleanups (back_to); -Index: gdb-7.9.90.20150717/gdb/build-id.c +Index: gdb-7.10.50.20160106/gdb/build-id.c =================================================================== ---- gdb-7.9.90.20150717.orig/gdb/build-id.c 2015-08-01 20:07:15.791993435 +0200 -+++ gdb-7.9.90.20150717/gdb/build-id.c 2015-08-01 20:08:27.735546630 +0200 +--- gdb-7.10.50.20160106.orig/gdb/build-id.c ++++ gdb-7.10.50.20160106/gdb/build-id.c @@ -35,6 +35,7 @@ #include "elf/common.h" #include "elf-bfd.h" @@ -1109,7 +1112,7 @@ Index: gdb-7.9.90.20150717/gdb/build-id.c #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -665,8 +666,363 @@ build_id_to_filename (const struct bfd_b +@@ -665,8 +666,366 @@ build_id_to_filename (const struct bfd_b return result; } @@ -1187,6 +1190,9 @@ Index: gdb-7.9.90.20150717/gdb/build-id.c + if (strcmp (filename, BUILD_ID_MAIN_EXECUTABLE_FILENAME) == 0) + return 0; + ++ if (is_target_filename (filename)) ++ return 0; ++ + if (filename[0] != '/') + { + warning (_("Ignoring non-absolute filename: <%s>"), filename); @@ -1474,7 +1480,7 @@ Index: gdb-7.9.90.20150717/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -720,11 +1076,17 @@ missing_filepair_change (void) +@@ -720,11 +1079,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -1492,7 +1498,7 @@ Index: gdb-7.9.90.20150717/gdb/build-id.c missing_filepair_change (); } -@@ -791,14 +1153,39 @@ debug_print_missing (const char *binary, +@@ -791,14 +1156,39 @@ debug_print_missing (const char *binary, *slot = missing_filepair; diff --git a/SOURCES/gdb-6.6-buildid-locate.patch b/SOURCES/gdb-6.6-buildid-locate.patch index dc05c39..b25ad8e 100644 --- a/SOURCES/gdb-6.6-buildid-locate.patch +++ b/SOURCES/gdb-6.6-buildid-locate.patch @@ -1,7 +1,7 @@ -Index: gdb-7.9.90.20150709/gdb/corelow.c +Index: gdb-7.10.90.20160211/gdb/corelow.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/corelow.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/corelow.c 2015-07-09 22:05:42.057222722 +0200 +--- gdb-7.10.90.20160211.orig/gdb/corelow.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/corelow.c 2016-02-15 23:26:46.516096395 +0100 @@ -45,6 +45,10 @@ #include "gdb_bfd.h" #include "completer.h" @@ -13,7 +13,7 @@ Index: gdb-7.9.90.20150709/gdb/corelow.c #ifndef O_LARGEFILE #define O_LARGEFILE 0 -@@ -266,6 +270,53 @@ add_to_thread_list (bfd *abfd, asection +@@ -266,6 +270,53 @@ inferior_ptid = ptid; /* Yes, make it current. */ } @@ -67,7 +67,7 @@ Index: gdb-7.9.90.20150709/gdb/corelow.c /* This routine opens and sets up the core file bfd. */ static void -@@ -404,6 +455,14 @@ core_open (const char *arg, int from_tty +@@ -404,6 +455,14 @@ switch_to_thread (thread->ptid); } @@ -82,7 +82,7 @@ Index: gdb-7.9.90.20150709/gdb/corelow.c post_create_inferior (&core_ops, from_tty); /* Now go through the target stack looking for threads since there -@@ -1058,4 +1117,11 @@ _initialize_corelow (void) +@@ -1068,4 +1127,11 @@ init_core_ops (); add_target_with_completer (&core_ops, filename_completer); @@ -94,11 +94,11 @@ Index: gdb-7.9.90.20150709/gdb/corelow.c + NULL, NULL, NULL, + &setlist, &showlist); } -Index: gdb-7.9.90.20150709/gdb/doc/gdb.texinfo +Index: gdb-7.10.90.20160211/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/doc/gdb.texinfo 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/doc/gdb.texinfo 2015-07-09 22:05:42.067222806 +0200 -@@ -18304,6 +18304,27 @@ information files. +--- gdb-7.10.90.20160211.orig/gdb/doc/gdb.texinfo 2016-02-15 23:25:36.455598958 +0100 ++++ gdb-7.10.90.20160211/gdb/doc/gdb.texinfo 2016-02-15 23:26:06.362811302 +0100 +@@ -18684,6 +18684,27 @@ @end table @@ -126,10 +126,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/solib-svr4.c +Index: gdb-7.10.90.20160211/gdb/solib-svr4.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/solib-svr4.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/solib-svr4.c 2015-07-09 22:05:42.068222815 +0200 +--- gdb-7.10.90.20160211.orig/gdb/solib-svr4.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/solib-svr4.c 2016-02-15 23:26:46.613097083 +0100 @@ -45,6 +45,7 @@ #include "auxv.h" #include "gdb_bfd.h" @@ -138,7 +138,7 @@ Index: gdb-7.9.90.20150709/gdb/solib-svr4.c static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1379,9 +1380,52 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD +@@ -1416,9 +1417,52 @@ continue; } @@ -194,11 +194,11 @@ Index: gdb-7.9.90.20150709/gdb/solib-svr4.c xfree (buffer); /* If this entry has no name, or its name matches the name -Index: gdb-7.9.90.20150709/gdb/elfread.c +Index: gdb-7.10.90.20160211/gdb/elfread.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/elfread.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/elfread.c 2015-07-09 22:05:42.068222815 +0200 -@@ -1250,9 +1250,10 @@ elf_symfile_read (struct objfile *objfil +--- gdb-7.10.90.20160211.orig/gdb/elfread.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/elfread.c 2016-02-15 23:26:06.364811316 +0100 +@@ -1259,9 +1259,10 @@ && objfile->separate_debug_objfile == NULL && objfile->separate_debug_objfile_backlink == NULL) { @@ -211,7 +211,7 @@ Index: gdb-7.9.90.20150709/gdb/elfread.c if (debugfile == NULL) debugfile = find_separate_debug_file_by_debuglink (objfile); -@@ -1266,6 +1267,12 @@ elf_symfile_read (struct objfile *objfil +@@ -1275,6 +1276,12 @@ symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile); do_cleanups (cleanup); } @@ -224,11 +224,11 @@ Index: gdb-7.9.90.20150709/gdb/elfread.c } } -Index: gdb-7.9.90.20150709/gdb/symfile.h +Index: gdb-7.10.90.20160211/gdb/symfile.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/symfile.h 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/symfile.h 2015-07-09 22:05:42.068222815 +0200 -@@ -584,6 +584,10 @@ void expand_symtabs_matching (expand_sym +--- gdb-7.10.90.20160211.orig/gdb/symfile.h 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/symfile.h 2016-02-15 23:26:46.516096395 +0100 +@@ -584,6 +584,10 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname); @@ -239,11 +239,11 @@ Index: gdb-7.9.90.20150709/gdb/symfile.h /* From dwarf2read.c */ /* Names for a dwarf2 debugging section. The field NORMAL is the normal -Index: gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/gdb.exp 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp 2015-07-09 22:05:42.070222832 +0200 -@@ -1573,6 +1573,16 @@ proc default_gdb_start { } { +--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/gdb.exp 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp 2016-02-15 23:26:46.516096395 +0100 +@@ -1640,6 +1640,16 @@ warning "Couldn't set the width to 0." } } @@ -260,11 +260,11 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp return 0 } -Index: gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/lib/mi-support.exp =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/mi-support.exp 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp 2015-07-09 22:05:42.070222832 +0200 -@@ -214,6 +214,16 @@ proc default_mi_gdb_start { args } { +--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/mi-support.exp 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/lib/mi-support.exp 2016-02-15 23:26:46.516096395 +0100 +@@ -204,6 +204,16 @@ warning "Couldn't set the width to 0." } } @@ -278,14 +278,14 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp + warning "Could not disable the missing debug infos warnings.." + } + } - # If allowing the inferior to have its own PTY then assign the inferior - # its own terminal device here. + + # Create the new PTY for the inferior process. if { $separate_inferior_pty } { -Index: gdb-7.9.90.20150709/gdb/objfiles.h +Index: gdb-7.10.90.20160211/gdb/objfiles.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/objfiles.h 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/objfiles.h 2015-07-09 22:05:42.071222840 +0200 -@@ -459,6 +459,10 @@ struct objfile +--- gdb-7.10.90.20160211.orig/gdb/objfiles.h 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/objfiles.h 2016-02-15 23:26:06.366811330 +0100 +@@ -489,6 +489,10 @@ #define OBJF_NOT_FILENAME (1 << 6) @@ -296,11 +296,11 @@ Index: gdb-7.9.90.20150709/gdb/objfiles.h /* Declarations for functions defined in objfiles.c */ extern struct objfile *allocate_objfile (bfd *, const char *name, int); -Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/corefile.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/corefile.exp =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/testsuite/gdb.base/corefile.exp 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/corefile.exp 2015-07-09 22:05:42.071222840 +0200 -@@ -293,3 +293,33 @@ gdb_test_multiple "core-file $corefile" +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/corefile.exp 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/corefile.exp 2016-02-15 23:26:55.178157896 +0100 +@@ -293,3 +293,33 @@ pass $test } } @@ -316,7 +316,7 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/corefile.exp + gdb_start + + regsub {\.debug$} $buildid {} buildid -+ set debugdir ${objdir}/${subdir}/${testfile}-debugdir ++ set debugdir [standard_output_file ${testfile}-debugdir] + file delete -force -- $debugdir + file mkdir $debugdir/[file dirname $buildid] + file copy $binfile $debugdir/$buildid @@ -334,10 +334,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/build-id.c +Index: gdb-7.10.90.20160211/gdb/build-id.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/build-id.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/build-id.c 2015-07-09 22:19:35.022957009 +0200 +--- gdb-7.10.90.20160211.orig/gdb/build-id.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/build-id.c 2016-02-15 23:26:46.516096395 +0100 @@ -26,11 +26,67 @@ #include "objfiles.h" #include "filenames.h" @@ -407,7 +407,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c { if (!bfd_check_format (abfd, bfd_object)) return NULL; -@@ -42,6 +98,348 @@ build_id_bfd_get (bfd *abfd) +@@ -42,6 +98,348 @@ return NULL; } @@ -756,7 +756,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c /* See build-id.h. */ int -@@ -50,7 +448,7 @@ build_id_verify (bfd *abfd, size_t check +@@ -50,7 +448,7 @@ const struct bfd_build_id *found; int retval = 0; @@ -765,7 +765,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), -@@ -65,20 +463,56 @@ build_id_verify (bfd *abfd, size_t check +@@ -65,23 +463,56 @@ return retval; } @@ -818,15 +818,18 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c struct cleanup *back_to; int ix; bfd *abfd = NULL; +- int alloc_len; /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */ -- link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1 -- + 2 * build_id_len + (sizeof ".debug" - 1) + 1); +- alloc_len = (strlen (debug_file_directory) +- + (sizeof "/.build-id/" - 1) + 1 +- + 2 * build_id_len + (sizeof ".debug" - 1) + 1); +- link = (char *) alloca (alloc_len); + link = xmalloc (strlen (debug_file_directory) + 2 * build_id_len + 50); /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will cause "/.build-id/..." lookups. */ -@@ -91,9 +525,12 @@ build_id_to_debug_bfd (size_t build_id_l +@@ -94,9 +525,12 @@ size_t debugdir_len = strlen (debugdir); const gdb_byte *data = build_id; size_t size = build_id_len; @@ -840,7 +843,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c memcpy (link, debugdir, debugdir_len); s = &link[debugdir_len]; -@@ -107,47 +544,281 @@ build_id_to_debug_bfd (size_t build_id_l +@@ -110,47 +544,281 @@ *s++ = '/'; while (size-- > 0) s += sprintf (s, "%02x", (unsigned) *data++); @@ -1141,7 +1144,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd), -@@ -167,3 +838,21 @@ find_separate_debug_file_by_buildid (str +@@ -170,3 +838,21 @@ } return NULL; } @@ -1163,10 +1166,10 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c + + observer_attach_executable_changed (debug_print_executable_changed); +} -Index: gdb-7.9.90.20150709/gdb/build-id.h +Index: gdb-7.10.90.20160211/gdb/build-id.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/build-id.h 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/build-id.h 2015-07-09 22:05:42.072222849 +0200 +--- gdb-7.10.90.20160211.orig/gdb/build-id.h 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/build-id.h 2016-02-15 23:26:06.368811345 +0100 @@ -20,9 +20,10 @@ #ifndef BUILD_ID_H #define BUILD_ID_H @@ -1180,7 +1183,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.h /* 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, +@@ -36,13 +37,18 @@ the caller. */ extern bfd *build_id_to_debug_bfd (size_t build_id_len, @@ -1201,11 +1204,11 @@ Index: gdb-7.9.90.20150709/gdb/build-id.h + char **build_id_filename_return); #endif /* BUILD_ID_H */ -Index: gdb-7.9.90.20150709/gdb/dwarf2read.c +Index: gdb-7.10.90.20160211/gdb/dwarf2read.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/dwarf2read.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/dwarf2read.c 2015-07-09 22:05:42.077222891 +0200 -@@ -2507,7 +2507,7 @@ dwarf2_get_dwz_file (void) +--- gdb-7.10.90.20160211.orig/gdb/dwarf2read.c 2016-02-15 23:25:36.461599001 +0100 ++++ gdb-7.10.90.20160211/gdb/dwarf2read.c 2016-02-15 23:26:06.373811380 +0100 +@@ -2516,7 +2516,7 @@ } if (dwz_bfd == NULL) @@ -1214,11 +1217,11 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), -Index: gdb-7.9.90.20150709/gdb/python/py-objfile.c +Index: gdb-7.10.90.20160211/gdb/python/py-objfile.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/python/py-objfile.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/python/py-objfile.c 2015-07-09 22:05:42.077222891 +0200 -@@ -139,7 +139,7 @@ objfpy_get_build_id (PyObject *self, voi +--- gdb-7.10.90.20160211.orig/gdb/python/py-objfile.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/python/py-objfile.c 2016-02-15 23:26:06.373811380 +0100 +@@ -139,7 +139,7 @@ TRY { @@ -1227,7 +1230,7 @@ Index: gdb-7.9.90.20150709/gdb/python/py-objfile.c } CATCH (except, RETURN_MASK_ALL) { -@@ -548,7 +548,7 @@ objfpy_lookup_objfile_by_build_id (const +@@ -548,7 +548,7 @@ /* Don't return separate debug files. */ if (objfile->separate_debug_objfile_backlink != NULL) continue; @@ -1236,11 +1239,11 @@ Index: gdb-7.9.90.20150709/gdb/python/py-objfile.c if (obfd_build_id == NULL) continue; if (objfpy_build_id_matches (obfd_build_id, build_id)) -Index: gdb-7.9.90.20150709/gdb/coffread.c +Index: gdb-7.10.90.20160211/gdb/coffread.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/coffread.c 2015-07-09 22:05:20.988044312 +0200 -+++ gdb-7.9.90.20150709/gdb/coffread.c 2015-07-09 22:05:42.078222899 +0200 -@@ -739,7 +739,7 @@ coff_symfile_read (struct objfile *objfi +--- gdb-7.10.90.20160211.orig/gdb/coffread.c 2016-02-15 23:25:00.859346221 +0100 ++++ gdb-7.10.90.20160211/gdb/coffread.c 2016-02-15 23:26:06.374811387 +0100 +@@ -739,7 +739,7 @@ { char *debugfile; diff --git a/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch b/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch index c2d0180..acaaeb4 100644 --- a/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch +++ b/SOURCES/gdb-6.6-bz229517-gcore-without-terminal.patch @@ -7,20 +7,25 @@ * gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files. ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000 -@@ -0,0 +1,43 @@ +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c 2016-02-16 10:44:48.998527259 +0100 +@@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include ++#include ++#include + +int main (int argc, char **argv) +{ + pid_t pid = 0; + pid_t ppid; -+ char buf[256]; ++ char buf[1024*2 + 500]; ++ int gotint; + + if (argc != 4) + { @@ -37,8 +42,10 @@ + if (strcmp (argv[1], "detached") == 0) + setpgrp (); + ppid = getppid (); -+ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid); ++ gotint = snprintf (buf, sizeof (buf), "sh %s -o %s %d", argv[2], argv[3], (int) ppid); ++ assert (gotint < sizeof (buf)); + system (buf); ++ fprintf (stderr, "Killing parent PID %d\n", ppid); + kill (ppid, SIGTERM); + break; + @@ -48,13 +55,16 @@ + break; + + default: ++ fprintf (stderr,"Sleeping as PID %d\n", getpid ()); + sleep (60); + } + + return 0; +} ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp 2016-02-16 10:44:48.999527265 +0100 @@ -0,0 +1,113 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -81,14 +91,14 @@ +# accessible terminal. + +if ![info exists GCORE] { -+ set GCORE "${srcdir}/../gdb_gcore.sh" ++ set GCORE "[standard_output_file ../../../../gcore]" +} +verbose "using GCORE = $GCORE" 2 + +set testfile "gcorebg" +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+set corefile ${objdir}/${subdir}/${testfile}.test ++set binfile [standard_output_file ${testfile}] ++set corefile [standard_output_file ${testfile}.test] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested gcorebg.exp @@ -137,11 +147,11 @@ + pass "Spawning $detached gcore" + remote_expect target 20 { + timeout { -+ fail "Spawned $detached gcore finished" ++ fail "Spawned $detached gcore finished (timeout)" + remote_exec target "kill -9 -[exp_pid -i $res]" + return 1 + } -+ eof { ++ "Saved corefile .*\r\nKilling parent PID " { + pass "Spawned $detached gcore finished" + remote_wait target 20 + } diff --git a/SOURCES/gdb-6.6-bz235197-fork-detach-info.patch b/SOURCES/gdb-6.6-bz235197-fork-detach-info.patch index 26c928d..660fa74 100644 --- a/SOURCES/gdb-6.6-bz235197-fork-detach-info.patch +++ b/SOURCES/gdb-6.6-bz235197-fork-detach-info.patch @@ -3,10 +3,10 @@ Port to GDB-6.8pre. Remove the `[' character from the GDB-6.8 default message. -Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c 2015-05-31 18:23:49.008450716 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c 2016-02-15 23:25:36.686600598 +0100 @@ -0,0 +1,57 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -65,10 +65,10 @@ Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.c + } + return 0; +} -Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp 2015-05-31 18:23:49.008450716 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp 2016-02-15 23:27:55.792588265 +0100 @@ -0,0 +1,36 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -88,7 +88,7 @@ Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp + +set testfile fork-detach +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -106,11 +106,11 @@ Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.base/fork-detach.exp +gdb_test "" \ + "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \ + "Info message caught" -Index: gdb-7.9.50.20150531/gdb/infrun.c +Index: gdb-7.10.90.20160211/gdb/infrun.c =================================================================== ---- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:41.703405617 +0200 -+++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:23:49.011450735 +0200 -@@ -443,7 +443,7 @@ holding the child stopped. Try \"set de +--- gdb-7.10.90.20160211.orig/gdb/infrun.c 2016-02-15 23:25:01.432350289 +0100 ++++ gdb-7.10.90.20160211/gdb/infrun.c 2016-02-15 23:27:49.274541986 +0100 +@@ -478,7 +478,7 @@ remove_breakpoints_pid (ptid_get_pid (inferior_ptid)); } @@ -119,3 +119,25 @@ Index: gdb-7.9.50.20150531/gdb/infrun.c { /* Ensure that we have a process ptid. */ ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid)); +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp +=================================================================== +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:01.432350289 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:36.689600619 +0100 +@@ -165,7 +165,7 @@ + # Deleting the catchpoints + delete_breakpoints + +- gdb_continue_to_end ++ gdb_continue_to_end "" continue 1 + } + + proc test_catch_syscall_without_args {} { +@@ -236,7 +236,7 @@ + # If it doesn't, everything is right (since we don't have + # a syscall named "mlock" in it). Otherwise, this is a failure. + set thistest "catch syscall with unused syscall ($syscall_name)" +- gdb_continue_to_end $thistest ++ gdb_continue_to_end $thistest continue 1 + } + } + diff --git a/SOURCES/gdb-6.6-scheduler_locking-step-is-default.patch b/SOURCES/gdb-6.6-scheduler_locking-step-is-default.patch index e8e0595..4967b92 100644 --- a/SOURCES/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/SOURCES/gdb-6.6-scheduler_locking-step-is-default.patch @@ -1,21 +1,21 @@ -Index: gdb-7.7.50.20140609/gdb/infrun.c +Index: gdb-7.10.50.20151022/gdb/infrun.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/infrun.c 2014-06-13 20:08:51.225699203 +0200 -+++ gdb-7.7.50.20140609/gdb/infrun.c 2014-06-13 20:08:55.515703466 +0200 -@@ -1661,7 +1661,7 @@ static const char *const scheduler_enums - schedlock_step, +--- gdb-7.10.50.20151022.orig/gdb/infrun.c 2015-10-22 22:30:15.887224452 +0200 ++++ gdb-7.10.50.20151022/gdb/infrun.c 2015-10-22 22:30:25.742282478 +0200 +@@ -2175,7 +2175,7 @@ static const char *const scheduler_enums + schedlock_replay, NULL }; --static const char *scheduler_mode = schedlock_off; +-static const char *scheduler_mode = schedlock_replay; +static const char *scheduler_mode = schedlock_step; static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-cli.exp +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-cli.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2014-06-13 20:08:55.515703466 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-cli.exp 2014-06-13 20:09:24.862732832 +0200 -@@ -181,7 +181,7 @@ mi_expect_stop "breakpoint-hit" "main" " +--- gdb-7.10.50.20151022.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2015-10-22 22:29:38.352003447 +0200 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-cli.exp 2015-10-22 22:30:15.888224458 +0200 +@@ -199,7 +199,7 @@ mi_expect_stop "breakpoint-hit" "main" " # Test that the token is output even for CLI commands # Also test that *stopped includes frame information. mi_gdb_test "34 next" \ @@ -24,10 +24,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-cli.exp "34 next: run" # Test that the new current source line is output to the console -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-logging.exp +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-logging.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2014-06-13 20:08:51.227699205 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-logging.exp 2014-06-13 20:08:55.516703467 +0200 +--- gdb-7.10.50.20151022.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2015-10-22 22:29:38.352003447 +0200 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-logging.exp 2015-10-22 22:30:15.888224458 +0200 @@ -53,7 +53,7 @@ close $chan set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+" @@ -46,10 +46,10 @@ Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-logging.exp pass "Redirect log file contents" } else { fail "Redirect log file contents" -Index: gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-console.exp +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-console.exp =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/testsuite/gdb.mi/mi-console.exp 2014-06-13 20:08:51.227699205 +0200 -+++ gdb-7.7.50.20140609/gdb/testsuite/gdb.mi/mi-console.exp 2014-06-13 20:08:55.516703467 +0200 +--- gdb-7.10.50.20151022.orig/gdb/testsuite/gdb.mi/mi-console.exp 2015-10-22 22:29:38.353003453 +0200 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.mi/mi-console.exp 2015-10-22 22:30:15.888224458 +0200 @@ -60,6 +60,9 @@ if { [gdb_compile "${srcdir}/${subdir}/ mi_run_to_main diff --git a/SOURCES/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch b/SOURCES/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch index 9dc8a7b..16f7165 100644 --- a/SOURCES/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch +++ b/SOURCES/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch @@ -8,8 +8,10 @@ http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html * gdb.arch/i386-interface.exp: Fix a testcase race. ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.arch/i386-interface.S 22 Dec 2007 19:07:28 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S 2016-02-15 23:23:03.318502357 +0100 @@ -0,0 +1,628 @@ +/* Copyright 2007 Free Software Foundation, Inc. + @@ -639,8 +641,10 @@ http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html + .long 0x0 + .ident "GCC: (GNU) 4.3.0 20071221 (experimental)" + .section .note.GNU-stack,"",@progbits ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.arch/i386-interface.exp 22 Dec 2007 19:07:28 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp 2016-02-15 23:23:15.978593556 +0100 @@ -0,0 +1,59 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -672,7 +676,7 @@ http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html + +set testfile "i386-interface" +set srcfile ${testfile}.S -+set binfile ${objdir}/${subdir}/${testfile}.o ++set binfile [standard_output_file ${testfile}.o] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } { + untested i386-gnu-cfi.exp diff --git a/SOURCES/gdb-6.7-charsign-test.patch b/SOURCES/gdb-6.7-charsign-test.patch index 793ff8a..7ff3fff 100644 --- a/SOURCES/gdb-6.7-charsign-test.patch +++ b/SOURCES/gdb-6.7-charsign-test.patch @@ -10,8 +10,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128 Port to GDB-6.7 - only the testcase left, patch has been reverted, char-vectors restricted. ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/charsign.c 26 Jan 2007 10:32:00 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c 2016-02-15 23:26:06.429811778 +0100 @@ -0,0 +1,37 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -50,8 +52,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128 +char_n n_typed[]="A"; +char_s s_typed[]="A"; +char_u u_typed[]="A"; ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ./gdb/testsuite/gdb.base/charsign.exp 26 Jan 2007 10:32:00 -0000 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp 2016-02-15 23:26:12.409854237 +0100 @@ -0,0 +1,63 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -71,7 +75,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128 + +set testfile charsign +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +proc do_test { cflags } { + global srcdir diff --git a/SOURCES/gdb-6.8-attach-signalled-detach-stopped.patch b/SOURCES/gdb-6.8-attach-signalled-detach-stopped.patch index 7c2618b..a0c472b 100644 --- a/SOURCES/gdb-6.8-attach-signalled-detach-stopped.patch +++ b/SOURCES/gdb-6.8-attach-signalled-detach-stopped.patch @@ -1,48 +1,87 @@ -Index: gdb-7.9.50.20150531/gdb/linux-nat.c -=================================================================== ---- gdb-7.9.50.20150531.orig/gdb/linux-nat.c 2015-05-31 18:23:56.147494790 +0200 -+++ gdb-7.9.50.20150531/gdb/linux-nat.c 2015-05-31 18:24:01.935530759 +0200 -@@ -168,6 +168,9 @@ blocked. */ +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/infrun.c gdb-7.10.50.20160106/gdb/infrun.c +--- gdb-7.10.50.20160106-orig/gdb/infrun.c 2016-01-09 15:05:06.127481758 +0100 ++++ gdb-7.10.50.20160106/gdb/infrun.c 2016-01-09 15:05:24.054593048 +0100 +@@ -626,6 +626,13 @@ holding the child stopped. Try \"set de + target_pid_to_str (process_ptid)); + } + ++#ifdef NEED_DETACH_SIGSTOP ++ /* 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. */ ++#endif + target_detach (NULL, 0); + } + +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/linux-nat.c gdb-7.10.50.20160106/gdb/linux-nat.c +--- gdb-7.10.50.20160106-orig/gdb/linux-nat.c 2016-01-09 15:05:06.225482366 +0100 ++++ gdb-7.10.50.20160106/gdb/linux-nat.c 2016-01-09 15:05:24.050593023 +0100 +@@ -194,6 +194,11 @@ enum tribool have_ptrace_getregset = TRI static struct target_ops *linux_ops; static struct target_ops linux_ops_saved; ++#ifdef NEED_DETACH_SIGSTOP +/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */ +static pid_t pid_was_stopped; + ++#endif /* The method to call, if any, when a new thread is attached. */ static void (*linux_nat_new_thread) (struct lwp_info *); -@@ -981,6 +984,7 @@ linux_nat_post_attach_wait (ptid_t ptid, +@@ -961,6 +966,9 @@ linux_nat_post_attach_wait (ptid_t ptid, if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LNPAW: Attaching to a stopped process\n"); ++#ifdef NEED_DETACH_SIGSTOP + pid_was_stopped = ptid_get_pid (ptid); ++#endif /* The process is definitely stopped. It is in a job control stop, unless the kernel predates the TASK_STOPPED / -@@ -1468,6 +1472,9 @@ get_pending_status (struct lwp_info *lp, +@@ -1303,6 +1311,25 @@ get_pending_status (struct lwp_info *lp, gdb_signal_to_string (signo)); } -+ if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped) -+ *status = W_STOPCODE (SIGSTOP); ++#ifdef NEED_DETACH_SIGSTOP ++ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that ++ many TIDs are left unstopped). See RH Bug 496732. */ ++ if (ptid_get_pid (lp->ptid) == pid_was_stopped) ++ { ++ int err; ++ ++ errno = 0; ++ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP); ++ if (debug_linux_nat) ++ { ++ fprintf_unfiltered (gdb_stdlog, ++ "SC: lwp kill %d %s\n", ++ err, ++ errno ? safe_strerror (errno) : "ERRNO-OK"); ++ } ++ } + ++#endif return 0; } -@@ -1581,6 +1588,8 @@ linux_nat_detach (struct target_ops *ops +@@ -1416,6 +1443,10 @@ linux_nat_detach (struct target_ops *ops } else linux_ops->to_detach (ops, args, from_tty); ++#ifdef NEED_DETACH_SIGSTOP + + pid_was_stopped = 0; ++#endif } /* Resume execution of the inferior process. If STEP is nonzero, -@@ -1839,6 +1848,14 @@ linux_nat_resume (struct target_ops *ops +@@ -1674,6 +1705,16 @@ linux_nat_resume (struct target_ops *ops return; } ++#ifdef NEED_DETACH_SIGSTOP + /* At this point, we are going to resume the inferior and if we + have attached to a stopped process, we no longer should leave + it as stopped if the user detaches. PTID variable has PID set to LWP @@ -51,23 +90,25 @@ Index: gdb-7.9.50.20150531/gdb/linux-nat.c + if (!step && lp && pid_was_stopped == ptid_get_pid (lp->ptid)) + pid_was_stopped = 0; + ++#endif if (resume_many) iterate_over_lwps (ptid, linux_nat_resume_callback, lp); -@@ -3935,6 +3952,8 @@ linux_nat_mourn_inferior (struct target_ +@@ -3618,6 +3659,10 @@ linux_nat_mourn_inferior (struct target_ /* Let the arch-specific native code know this process is gone. */ linux_nat_forget_process (pid); ++#ifdef NEED_DETACH_SIGSTOP + + pid_was_stopped = 0; ++#endif } /* Convert a native/host siginfo object, into/from the siginfo in the -Index: gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp -=================================================================== ---- gdb-7.9.50.20150531.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:23:56.148494796 +0200 -+++ gdb-7.9.50.20150531/gdb/testsuite/gdb.threads/attach-stopped.exp 2015-05-31 18:24:01.935530759 +0200 -@@ -61,7 +61,65 @@ proc corefunc { threadtype } { +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/testsuite/gdb.threads/attach-stopped.exp gdb-7.10.50.20160106/gdb/testsuite/gdb.threads/attach-stopped.exp +--- gdb-7.10.50.20160106-orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-01-06 02:48:38.000000000 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.threads/attach-stopped.exp 2016-01-09 15:05:48.917747101 +0100 +@@ -56,7 +56,65 @@ proc corefunc { threadtype } { gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} @@ -134,19 +175,3 @@ Index: gdb-7.9.50.20150531/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.9.50.20150531/gdb/infrun.c -=================================================================== ---- gdb-7.9.50.20150531.orig/gdb/infrun.c 2015-05-31 18:23:56.150494809 +0200 -+++ gdb-7.9.50.20150531/gdb/infrun.c 2015-05-31 18:24:01.938530778 +0200 -@@ -591,6 +591,11 @@ holding the child stopped. Try \"set de - target_pid_to_str (process_ptid)); - } - -+ /* 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/SOURCES/gdb-6.8-bz442765-threaded-exec-test.patch b/SOURCES/gdb-6.8-bz442765-threaded-exec-test.patch index 1006588..77312fd 100644 --- a/SOURCES/gdb-6.8-bz442765-threaded-exec-test.patch +++ b/SOURCES/gdb-6.8-bz442765-threaded-exec-test.patch @@ -1,8 +1,9 @@ Test various forms of threads tracking across exec(2). -diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c ---- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 17:05:19.000000000 -0400 -+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 14:43:50.000000000 -0400 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c +=================================================================== +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:45.157163049 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:46.210170175 +0100 @@ -18,21 +18,95 @@ Boston, MA 02111-1307, USA. */ @@ -102,7 +103,7 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads pthread_t t1; int i; -@@ -40,7 +114,34 @@ main (void) +@@ -40,7 +114,34 @@ assert (i == 0); i = pthread_join (t1, NULL); assert (i == 0); @@ -139,16 +140,17 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads + execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL); + assert (0); } -diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp ---- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 17:05:19.000000000 -0400 -+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 14:42:49.000000000 -0400 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp +=================================================================== +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:45.157163049 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:55:27.397448879 +0100 @@ -20,9 +20,14 @@ set testfile threaded-exec set srcfile ${testfile}.c --set binfile ${objdir}/${subdir}/${testfile} -+set binfile_nothreads ${objdir}/${subdir}/${testfile}N -+set binfile_threads ${objdir}/${subdir}/${testfile}Y +-set binfile [standard_output_file ${testfile}] ++set binfile_nothreads [standard_output_file ${testfile}N] ++set binfile_threads [standard_output_file ${testfile}Y] -if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } { +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } { @@ -159,7 +161,7 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads return -1 } -@@ -30,9 +35,9 @@ gdb_exit +@@ -30,9 +35,9 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir diff --git a/SOURCES/gdb-6.8-quit-never-aborts.patch b/SOURCES/gdb-6.8-quit-never-aborts.patch index f573c10..47e1c64 100644 --- a/SOURCES/gdb-6.8-quit-never-aborts.patch +++ b/SOURCES/gdb-6.8-quit-never-aborts.patch @@ -5,60 +5,65 @@ Some of the threads may not be properly PTRACE_DETACHed which hurts if they should have been detached with SIGSTOP (as they are accidentally left running on the debugger termination). -Index: gdb-7.9.50.20150520/gdb/defs.h -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/defs.h 2015-05-31 18:06:24.579002757 +0200 -+++ gdb-7.9.50.20150520/gdb/defs.h 2015-05-31 18:06:29.253031613 +0200 -@@ -145,6 +145,7 @@ extern void set_quit_flag (void); +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/defs.h gdb-7.10.50.20160106/gdb/defs.h +--- gdb-7.10.50.20160106-orig/gdb/defs.h 2016-01-09 15:06:57.658172875 +0100 ++++ gdb-7.10.50.20160106/gdb/defs.h 2016-01-09 15:07:12.431264378 +0100 +@@ -145,6 +145,9 @@ extern void set_quit_flag (void); /* Flag that function quit should call quit_force. */ extern volatile int sync_quit_force_run; ++#ifdef NEED_DETACH_SIGSTOP +extern int quit_flag_cleanup; ++#endif extern int immediate_quit; extern void quit (void); -Index: gdb-7.9.50.20150520/gdb/top.c -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/top.c 2015-05-31 18:06:24.580002763 +0200 -+++ gdb-7.9.50.20150520/gdb/top.c 2015-05-31 18:06:29.254031619 +0200 -@@ -1463,7 +1463,9 @@ quit_force (char *args, int from_tty) +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/extension.c gdb-7.10.50.20160106/gdb/extension.c +--- gdb-7.10.50.20160106-orig/gdb/extension.c 2016-01-06 02:48:37.000000000 +0100 ++++ gdb-7.10.50.20160106/gdb/extension.c 2016-01-09 15:07:12.434264396 +0100 +@@ -833,6 +833,11 @@ check_quit_flag (void) + int i, result = 0; + const struct extension_language_defn *extlang; + ++#ifdef NEED_DETACH_SIGSTOP ++ if (quit_flag_cleanup) ++ return 0; ++ ++#endif + ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang) + { + if (extlang->ops->check_quit_flag != NULL) +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/top.c gdb-7.10.50.20160106/gdb/top.c +--- gdb-7.10.50.20160106-orig/gdb/top.c 2016-01-06 02:48:38.000000000 +0100 ++++ gdb-7.10.50.20160106/gdb/top.c 2016-01-09 15:07:12.432264384 +0100 +@@ -1557,7 +1557,13 @@ quit_force (char *args, int from_tty) qt.args = args; qt.from_tty = from_tty; -- /* We want to handle any quit errors and exit regardless. */ ++#ifndef NEED_DETACH_SIGSTOP + /* We want to handle any quit errors and exit regardless. */ ++#else + /* We want to handle any quit errors and exit regardless but we should never + get user-interrupted to properly detach the inferior. */ + quit_flag_cleanup = 1; ++#endif /* Get out of tfind mode, and kill or detach all inferiors. */ TRY -Index: gdb-7.9.50.20150520/gdb/utils.c -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/utils.c 2015-05-31 18:06:24.582002776 +0200 -+++ gdb-7.9.50.20150520/gdb/utils.c 2015-05-31 18:06:29.255031625 +0200 -@@ -122,6 +122,11 @@ int job_control; +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/utils.c gdb-7.10.50.20160106/gdb/utils.c +--- gdb-7.10.50.20160106-orig/gdb/utils.c 2016-01-09 15:06:57.654172850 +0100 ++++ gdb-7.10.50.20160106/gdb/utils.c 2016-01-09 15:07:12.433264390 +0100 +@@ -122,6 +122,13 @@ int job_control; int immediate_quit; ++#ifdef NEED_DETACH_SIGSTOP +/* Nonzero means we are already processing the quitting cleanups and we should + no longer get aborted. */ + +int quit_flag_cleanup; + ++#endif /* Nonzero means that strings with character values >0x7F should be printed as octal escapes. Zero means just print the value (e.g. it's an international character, and the terminal or window can cope.) */ -Index: gdb-7.9.50.20150520/gdb/extension.c -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/extension.c 2015-05-31 18:06:24.582002776 +0200 -+++ gdb-7.9.50.20150520/gdb/extension.c 2015-05-31 18:06:29.256031632 +0200 -@@ -833,6 +833,9 @@ check_quit_flag (void) - int i, result = 0; - const struct extension_language_defn *extlang; - -+ if (quit_flag_cleanup) -+ return 0; -+ - ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang) - { - if (extlang->ops->check_quit_flag != NULL) diff --git a/SOURCES/gdb-6.8-watchpoint-conditionals-test.patch b/SOURCES/gdb-6.8-watchpoint-conditionals-test.patch index b014074..be00ed9 100644 --- a/SOURCES/gdb-6.8-watchpoint-conditionals-test.patch +++ b/SOURCES/gdb-6.8-watchpoint-conditionals-test.patch @@ -2,8 +2,10 @@ For: http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html ---- /dev/null 2008-11-04 06:31:10.599601840 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.exp 2008-11-04 06:43:29.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp 2016-02-15 23:33:49.519099759 +0100 @@ -0,0 +1,37 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -22,7 +24,7 @@ http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html + +set testfile watchpoint-cond +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -42,8 +44,10 @@ http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html + +gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i" +gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*" ---- /dev/null 2008-11-04 06:31:10.599601840 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.c 2008-11-04 06:42:48.000000000 +0100 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c 2016-02-15 23:32:51.974691188 +0100 @@ -0,0 +1,31 @@ +/* This testcase is part of GDB, the GNU debugger. + diff --git a/SOURCES/gdb-archer-pie-addons-keep-disabled.patch b/SOURCES/gdb-archer-pie-addons-keep-disabled.patch index 1f849d1..b6a486d 100644 --- a/SOURCES/gdb-archer-pie-addons-keep-disabled.patch +++ b/SOURCES/gdb-archer-pie-addons-keep-disabled.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.50.20140609/gdb/breakpoint.c +Index: gdb-7.10.50.20160121/gdb/breakpoint.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/breakpoint.c 2014-06-13 20:24:34.564667225 +0200 -+++ gdb-7.7.50.20140609/gdb/breakpoint.c 2014-06-13 20:24:35.650668351 +0200 -@@ -16364,6 +16364,50 @@ initialize_breakpoint_ops (void) +--- gdb-7.10.50.20160121.orig/gdb/breakpoint.c 2016-01-21 21:52:34.243387043 +0100 ++++ gdb-7.10.50.20160121/gdb/breakpoint.c 2016-01-21 21:53:00.365542925 +0100 +@@ -16139,6 +16139,50 @@ static struct cmd_list_element *enablebreaklist = NULL; void @@ -53,23 +53,23 @@ Index: gdb-7.7.50.20140609/gdb/breakpoint.c _initialize_breakpoint (void) { struct cmd_list_element *c; -Index: gdb-7.7.50.20140609/gdb/breakpoint.h +Index: gdb-7.10.50.20160121/gdb/breakpoint.h =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/breakpoint.h 2014-06-13 20:24:34.566667227 +0200 -+++ gdb-7.7.50.20140609/gdb/breakpoint.h 2014-06-13 20:24:35.651668352 +0200 -@@ -1553,4 +1553,7 @@ extern void breakpoint_free_objfile (str - - extern char *ep_parse_optional_if_clause (char **arg); +--- gdb-7.10.50.20160121.orig/gdb/breakpoint.h 2016-01-21 21:52:34.244387049 +0100 ++++ gdb-7.10.50.20160121/gdb/breakpoint.h 2016-01-21 21:53:00.366542931 +0100 +@@ -1629,4 +1629,7 @@ + UIOUT iff debugging multiple threads. */ + extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout); +extern void breakpoints_relocate (struct objfile *objfile, + struct section_offsets *delta); + #endif /* !defined (BREAKPOINT_H) */ -Index: gdb-7.7.50.20140609/gdb/objfiles.c +Index: gdb-7.10.50.20160121/gdb/objfiles.c =================================================================== ---- gdb-7.7.50.20140609.orig/gdb/objfiles.c 2014-06-13 20:24:35.652668353 +0200 -+++ gdb-7.7.50.20140609/gdb/objfiles.c 2014-06-13 20:25:10.867704891 +0200 -@@ -820,6 +820,11 @@ objfile_relocate1 (struct objfile *objfi +--- gdb-7.10.50.20160121.orig/gdb/objfiles.c 2016-01-21 21:52:34.245387055 +0100 ++++ gdb-7.10.50.20160121/gdb/objfiles.c 2016-01-21 21:53:00.367542937 +0100 +@@ -916,6 +916,11 @@ obj_section_addr (s)); } diff --git a/SOURCES/gdb-archer-vla-tests.patch b/SOURCES/gdb-archer-vla-tests.patch index d0fd183..fa60380 100644 --- a/SOURCES/gdb-archer-vla-tests.patch +++ b/SOURCES/gdb-archer-vla-tests.patch @@ -1,8 +1,8 @@ -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.ada/packed_array.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.ada/packed_array.exp =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.ada/packed_array.exp 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.ada/packed_array.exp 2014-06-16 23:30:30.107940483 +0200 -@@ -56,5 +56,11 @@ gdb_test_multiple "$test" "$test" { +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.ada/packed_array.exp 2016-02-15 23:33:29.830959972 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.ada/packed_array.exp 2016-02-15 23:35:56.289999846 +0100 +@@ -56,5 +56,11 @@ # are. Observed with (FSF GNU Ada 4.5.3 20110124). xfail $test } @@ -14,10 +14,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.ada/packed_array.exp + } } -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2014-06-16 23:30:30.108940484 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2016-02-15 23:35:56.290999853 +0100 @@ -0,0 +1,455 @@ + .file "x86_64-vla-typedef.c" + .section .debug_abbrev,"",@progbits @@ -474,11 +474,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S + .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)" + .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)" + .section .note.GNU-stack,"",@progbits -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2014-06-16 23:30:30.109940484 +0200 -@@ -0,0 +1,43 @@ ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2016-02-15 23:35:56.290999853 +0100 +@@ -0,0 +1,45 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2008 Free Software Foundation, Inc. @@ -513,6 +513,8 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c + +#else + ++void foo (int size); ++ +int +main (void) +{ @@ -522,10 +524,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c +} + +#endif -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2014-06-16 23:30:30.109940484 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2016-02-15 23:35:56.290999853 +0100 @@ -0,0 +1,64 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -552,8 +554,8 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp +set testfile x86_64-vla-typedef +set srcasmfile ${testfile}-foo.S +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} -+set binobjfile ${objdir}/${subdir}/${testfile}-foo.o ++set binfile [standard_output_file ${testfile}] ++set binobjfile [standard_output_file ${testfile}-foo.o] +if { [gdb_compile "${srcdir}/${subdir}/${srcasmfile}" "${binobjfile}" object {}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -591,10 +593,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp +gdb_test "whatis array" "type = array_t" "second: whatis array" + +gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.base/arrayidx.c 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.c 2014-06-16 23:30:30.109940484 +0200 +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/arrayidx.c 2016-02-15 23:33:29.830959972 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.c 2016-02-15 23:35:56.290999853 +0100 @@ -17,6 +17,13 @@ int array[] = {1, 2, 3, 4}; @@ -609,11 +611,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.c int main (void) { -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.exp =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/gdb.base/arrayidx.exp 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.exp 2014-06-16 23:30:30.109940484 +0200 -@@ -49,4 +49,12 @@ gdb_test "print array" \ +--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/arrayidx.exp 2016-02-15 23:33:29.830959972 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/arrayidx.exp 2016-02-15 23:35:56.291999860 +0100 +@@ -49,4 +49,12 @@ "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ "Print array with array-indexes on" @@ -627,10 +629,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/arrayidx.exp + unsupported "$test (no GCC)" + } +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.c 2014-06-16 23:30:30.109940484 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.c 2016-02-15 23:35:56.291999860 +0100 @@ -0,0 +1,20 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -652,10 +654,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.c +struct { + int field; +} staticstruct = { 1 }; -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.exp 2014-06-16 23:30:30.109940484 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/internal-var-field-address.exp 2016-02-15 23:35:56.291999860 +0100 @@ -0,0 +1,26 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -683,10 +685,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/internal-var-field-address.exp + +gdb_test {set $varstruct = staticstruct} +gdb_test {p $varstruct.field} " = 1" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.c 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.c 2016-02-15 23:35:56.291999860 +0100 @@ -0,0 +1,31 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -719,10 +721,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.c + f (s); + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.exp 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-frame.exp 2016-02-15 23:35:56.291999860 +0100 @@ -0,0 +1,38 @@ +# Copyright 2011 Free Software Foundation, Inc. +# @@ -762,10 +764,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-frame.exp +} + +gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.c 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.c 2016-02-15 23:35:56.291999860 +0100 @@ -0,0 +1,30 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -797,10 +799,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.c + + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.exp 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla-overflow.exp 2016-02-15 23:35:56.292999867 +0100 @@ -0,0 +1,109 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -832,9 +834,9 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.exp +# #29 in backtrace_command_1 () at ../../gdb/stack.c:1273 + +set testfile vla-overflow -+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh ++set shfile [standard_output_file ${testfile}-gdb.sh] +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -911,10 +913,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla-overflow.exp +gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()" + +verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.c 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.c 2016-02-15 23:35:56.292999867 +0100 @@ -0,0 +1,55 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -971,10 +973,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.c + foo (78); + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.exp 2014-06-16 23:30:30.110940485 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/vla.exp 2016-02-15 23:35:56.292999867 +0100 @@ -0,0 +1,62 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -993,7 +995,7 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.exp + +set testfile vla +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -1038,10 +1040,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/vla.exp +gdb_test "p temp1" " = '1' " "second: print temp1" +gdb_test "p temp2" " = '2' " "second: print temp2" +gdb_test "p temp3" " = '3' " "second: print temp3" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2014-06-16 23:30:30.111940487 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2016-02-15 23:35:56.292999867 +0100 @@ -0,0 +1,246 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1289,11 +1291,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S + .string "char" +.Luint_str: + .string "unsigned int" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2014-06-16 23:30:30.111940487 +0200 -@@ -0,0 +1,63 @@ ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2016-02-15 23:35:56.292999867 +0100 +@@ -0,0 +1,66 @@ +# Copyright 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -1332,17 +1334,20 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp + +# Verify it behaves at least as an unbound array without inferior. + -+set test "p a_string" -+gdb_test_multiple $test $test { -+ -re " = 0x\[0-9a-f\]+ \"seennotseen\"\r\n$gdb_prompt $" { -+ pass $test -+ } -+ -re "No registers\\.\r\n$gdb_prompt $" { -+ kfail "vlaregression" $test -+ } -+} -+ -+gdb_test "ptype a_string" {type = char \[variable length\]} ++# FIXME: FSF GDB crashes due to !has_stack_frames (). ++# But in practice that should not happen. ++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43762 ++#set test "p a_string" ++#gdb_test_multiple $test $test { ++# -re " = 0x\[0-9a-f\]+ \"seennotseen\"\r\n$gdb_prompt $" { ++# pass $test ++# } ++# -re "No registers\\.\r\n$gdb_prompt $" { ++# kfail "vlaregression" $test ++# } ++#} ++# ++#gdb_test "ptype a_string" {type = char \[variable length\]} + +# Not runto_main as dw2-bound-loclist.S handles only the first byte of main. +if ![runto "*main"] { @@ -1357,10 +1362,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp + +# The register contains unpredictable value - the array size. +gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2014-06-16 23:30:30.111940487 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,42 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1404,10 +1409,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.c + func1 (1, 2); + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2014-06-16 23:30:30.111940487 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,79 @@ +# Copyright 2006 Free Software Foundation, Inc. + @@ -1488,10 +1493,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp +gdb_test "step" \ + "func.* \\(.*\\) at .*" \ + "step" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,83 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1576,10 +1581,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-locat + + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,37 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -1618,10 +1623,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-locat +clean_restart $binfile + +gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,121 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -1744,10 +1749,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S + .byte 0x0 /* Terminator */ + + .byte 0x0 /* Terminator */ -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2016-02-15 23:35:56.293999874 +0100 @@ -0,0 +1,39 @@ +# Copyright 2012 Free Software Foundation, Inc. + @@ -1788,10 +1793,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp + +gdb_test "ptype notype_string" {type = char \[129\]} +gdb_test "p notype_string" " = 'x' " -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2016-02-15 23:35:56.294999881 +0100 @@ -0,0 +1,42 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -1835,10 +1840,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.exp +gdb_continue_to_breakpoint "break-here" ".*break-here.*" +gdb_test "p c40pt(1)" " = '0-hello.*" +gdb_test "p c40pt(2)" " = '1-hello.*" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.f90 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2014-06-16 23:30:30.112940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2016-02-15 23:35:56.294999881 +0100 @@ -0,0 +1,40 @@ +! Copyright 2009 Free Software Foundation, Inc. +! @@ -1880,10 +1885,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dwarf-stride.f90 + print *, c40pt ! break-here + +end program repro -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp 2014-06-16 23:37:45.568362563 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.exp 2016-02-15 23:36:39.358305635 +0100 @@ -0,0 +1,151 @@ +# Copyright 2007 Free Software Foundation, Inc. + @@ -1910,7 +1915,7 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp + +set testfile "dynamic" +set srcfile ${testfile}.f90 -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } { + untested "Couldn't compile ${srcfile}" @@ -1931,9 +1936,9 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp +gdb_continue_to_breakpoint "varx-init" +gdb_test "p varx" "\\$\[0-9\]* = " "p varx unallocated" +gdb_test "ptype varx" "type = " "ptype varx unallocated" -+gdb_test "p varx(1,5,17)" "no such vector element because not allocated" "p varx(1,5,17) unallocated" -+gdb_test "p varx(1,5,17)=1" "no such vector element because not allocated" "p varx(1,5,17)=1 unallocated" -+gdb_test "ptype varx(1,5,17)" "no such vector element because not allocated" "ptype varx(1,5,17) unallocated" ++gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) unallocated" ++gdb_test "p varx(1,5,17)=1" {no such vector element \(vector not allocated\)} "p varx(1,5,17)=1 unallocated" ++gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) unallocated" + +gdb_breakpoint [gdb_get_line_number "varx-allocated"] +gdb_continue_to_breakpoint "varx-allocated" @@ -1979,16 +1984,16 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp +gdb_test "p varv" "\\$\[0-9\]* = (|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "p varv deassociated" +gdb_test "ptype varv" "type = (|.*(Cannot access it|Unable to access the object) because the object is not associated.)" "ptype varv deassociated" +gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varv deassociated" -+gdb_test "p varv(1,5,17)" "no such vector element because not associated" -+gdb_test "ptype varv(1,5,17)" "no such vector element because not associated" ++gdb_test "p varv(1,5,17)" {no such vector element \(vector not associated\)} ++gdb_test "ptype varv(1,5,17)" {no such vector element \(vector not associated\)} + +gdb_breakpoint [gdb_get_line_number "varx-deallocated"] +gdb_continue_to_breakpoint "varx-deallocated" +gdb_test "p varx" "\\$\[0-9\]* = " "p varx deallocated" +gdb_test "ptype varx" "type = " "ptype varx deallocated" +gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varx deallocated" -+gdb_test "p varx(1,5,17)" "no such vector element because not allocated" "p varx(1,5,17) deallocated" -+gdb_test "ptype varx(1,5,17)" "no such vector element because not allocated" "ptype varx(1,5,17) deallocated" ++gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) deallocated" ++gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated" + +gdb_breakpoint [gdb_get_line_number "vary-passed"] +gdb_continue_to_breakpoint "vary-passed" @@ -2036,10 +2041,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.exp +gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9" +# maps to foo::vary(1,3) +gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.f90 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.f90 2014-06-16 23:30:30.113940488 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/dynamic.f90 2016-02-15 23:35:56.294999881 +0100 @@ -0,0 +1,98 @@ +! Copyright 2007 Free Software Foundation, Inc. +! @@ -2139,10 +2144,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/dynamic.f90 + if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort + if (x (3, 1) .ne. 10) call abort +end -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.exp 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.exp 2016-02-15 23:36:39.359305642 +0100 @@ -0,0 +1,59 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -2167,7 +2172,7 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.exp + +set testfile "string" +set srcfile ${testfile}.f90 -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } { + untested "Couldn't compile ${srcfile}" @@ -2203,10 +2208,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.exp +gdb_continue_to_breakpoint "var-finish" +gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set" +gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f2 ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\)" "p *f re-set" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.f90 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.f90 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/string.f90 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,37 @@ +! Copyright 2008 Free Software Foundation, Inc. +! @@ -2245,10 +2250,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/string.f90 + h = 'h' + call foo (g, h) +end -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.exp 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.exp 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,72 @@ +# Copyright 2011 Free Software Foundation, Inc. + @@ -2322,10 +2327,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.exp +gdb_unload +setup_kfail "*-*-*" "vlaregression/9999" +gdb_test {p $a (3, 2:2)} { = \(23\)} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.f90 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.f90 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.fortran/subrange.f90 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,28 @@ +! Copyright 2011 Free Software Foundation, Inc. +! @@ -2355,10 +2360,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/subrange.f90 + ptr => a + write (*,*) a ! break-static +end -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,26 @@ +/* Copyright 2011 Free Software Foundation, Inc. + @@ -2386,10 +2391,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.c + + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2014-06-16 23:30:30.114940489 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,57 @@ +# Copyright 2011 Free Software Foundation, Inc. +# @@ -2448,10 +2453,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp +mi_create_varobj "vla" "vla" "create local variable vla" + +mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register-func.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register-func.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register-func.c 2014-06-16 23:30:30.115940490 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register-func.c 2016-02-15 23:35:56.295999888 +0100 @@ -0,0 +1,22 @@ +/* This file is part of GDB, the GNU debugger. + @@ -2475,10 +2480,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register-func.c +{ + return arr[0]; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.c 2014-06-16 23:30:30.115940490 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.c 2016-02-15 23:35:56.296999895 +0100 @@ -0,0 +1,28 @@ +/* This file is part of GDB, the GNU debugger. + @@ -2508,10 +2513,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.c + + return 0; +} -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.exp 2014-06-16 23:30:30.115940490 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.opt/array-from-register.exp 2016-02-15 23:35:56.296999895 +0100 @@ -0,0 +1,33 @@ +# Copyright 2009 Free Software Foundation, Inc. +# @@ -2546,10 +2551,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.opt/array-from-register.exp +# Seen regression: +# Address requested for identifier "arr" which is in register $rdi +gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42" -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.exp 2014-06-16 23:30:30.115940490 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.exp 2016-02-15 23:36:39.359305642 +0100 @@ -0,0 +1,104 @@ +# Copyright 2008, 2009 Free Software Foundation, Inc. +# @@ -2574,7 +2579,7 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.exp + +set testfile "arrays" +set srcfile ${testfile}.pas -+set binfile ${objdir}/${subdir}/${testfile}$EXEEXT ++set binfile [standard_output_file ${testfile}$EXEEXT] + +# These tests only work with fpc, using the -gw3 compile-option +pascal_init @@ -2655,10 +2660,10 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.exp +} +gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char" + -Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.pas +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.pas =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.pas 2014-06-16 23:30:30.115940490 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pascal/arrays.pas 2016-02-15 23:35:56.296999895 +0100 @@ -0,0 +1,82 @@ +{ + Copyright 2008, 2009 Free Software Foundation, Inc. @@ -2742,11 +2747,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.pascal/arrays.pas + s := 'test'#0'string'; + writeln(s); { set breakpoint 2 here } +end. -Index: gdb-7.7.90.20140613/gdb/testsuite/lib/gdb.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/lib/gdb.exp 2014-06-16 23:30:29.278939700 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/lib/gdb.exp 2014-06-16 23:30:30.117940492 +0200 -@@ -159,6 +159,11 @@ proc gdb_unload {} { +--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/gdb.exp 2016-02-15 23:35:55.326993008 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/lib/gdb.exp 2016-02-15 23:35:56.297999903 +0100 +@@ -173,6 +173,11 @@ send_gdb "y\n" exp_continue } @@ -2758,11 +2763,11 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/lib/gdb.exp -re "Discard symbol table from .*y or n.*$" { send_gdb "y\n" exp_continue -Index: gdb-7.7.90.20140613/gdb/testsuite/lib/pascal.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/lib/pascal.exp =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/testsuite/lib/pascal.exp 2014-06-13 03:59:37.000000000 +0200 -+++ gdb-7.7.90.20140613/gdb/testsuite/lib/pascal.exp 2014-06-16 23:30:30.117940492 +0200 -@@ -37,6 +37,9 @@ proc pascal_init {} { +--- gdb-7.10.90.20160211.orig/gdb/testsuite/lib/pascal.exp 2016-02-15 23:33:29.830959972 +0100 ++++ gdb-7.10.90.20160211/gdb/testsuite/lib/pascal.exp 2016-02-15 23:35:56.298999910 +0100 +@@ -37,6 +37,9 @@ global pascal_compiler_is_fpc global gpc_compiler global fpc_compiler @@ -2772,7 +2777,7 @@ Index: gdb-7.7.90.20140613/gdb/testsuite/lib/pascal.exp global env if { $pascal_init_done == 1 } { -@@ -64,6 +67,20 @@ proc pascal_init {} { +@@ -64,6 +67,20 @@ set pascal_compiler_is_fpc 1 verbose -log "Free Pascal compiler found" } diff --git a/SOURCES/gdb-attach-fail-reasons-5of5.patch b/SOURCES/gdb-attach-fail-reasons-5of5.patch index 83005b4..48d7ab4 100644 --- a/SOURCES/gdb-attach-fail-reasons-5of5.patch +++ b/SOURCES/gdb-attach-fail-reasons-5of5.patch @@ -37,13 +37,13 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c +Index: gdb-7.10.50.20160106/gdb/nat/linux-ptrace.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/nat/linux-ptrace.c 2015-07-09 18:24:13.705140384 +0200 -+++ gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c 2015-07-09 18:24:24.911235973 +0200 -@@ -23,6 +23,10 @@ - #include "buffer.h" +--- gdb-7.10.50.20160106.orig/gdb/nat/linux-ptrace.c 2016-01-08 19:15:57.580707944 +0100 ++++ gdb-7.10.50.20160106/gdb/nat/linux-ptrace.c 2016-01-08 19:16:02.654736246 +0100 +@@ -24,6 +24,10 @@ #include "gdb_wait.h" + #include "gdb_ptrace.h" +#ifdef HAVE_SELINUX_SELINUX_H +# include @@ -52,7 +52,7 @@ Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ -@@ -47,6 +51,8 @@ linux_ptrace_attach_fail_reason (pid_t p +@@ -48,6 +52,8 @@ buffer_xml_printf (buffer, _("process %d is a zombie " "- the process has already terminated"), (int) pid); @@ -61,7 +61,7 @@ Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c } /* See linux-ptrace.h. */ -@@ -581,6 +587,22 @@ linux_ptrace_init_warnings (void) +@@ -594,6 +600,22 @@ linux_ptrace_test_ret_to_nx (); } @@ -84,11 +84,11 @@ Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.c /* Extract extended ptrace event from wait status. */ int -Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.h +Index: gdb-7.10.50.20160106/gdb/nat/linux-ptrace.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/nat/linux-ptrace.h 2015-07-09 18:24:13.706140392 +0200 -+++ gdb-7.9.90.20150709/gdb/nat/linux-ptrace.h 2015-07-09 18:24:24.912235981 +0200 -@@ -157,6 +157,7 @@ extern void linux_ptrace_attach_fail_rea +--- gdb-7.10.50.20160106.orig/gdb/nat/linux-ptrace.h 2016-01-08 19:15:57.581707950 +0100 ++++ gdb-7.10.50.20160106/gdb/nat/linux-ptrace.h 2016-01-08 19:16:02.655736251 +0100 +@@ -164,6 +164,7 @@ extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); extern void linux_ptrace_init_warnings (void); @@ -96,11 +96,11 @@ Index: gdb-7.9.90.20150709/gdb/nat/linux-ptrace.h extern void linux_check_ptrace_features (void); extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_disable_event_reporting (pid_t pid); -Index: gdb-7.9.90.20150709/gdb/configure.ac +Index: gdb-7.10.50.20160106/gdb/configure.ac =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/configure.ac 2015-07-09 18:24:13.707140401 +0200 -+++ gdb-7.9.90.20150709/gdb/configure.ac 2015-07-09 18:24:24.913235990 +0200 -@@ -2150,6 +2150,10 @@ case $host_os in +--- gdb-7.10.50.20160106.orig/gdb/configure.ac 2016-01-08 19:15:57.582707955 +0100 ++++ gdb-7.10.50.20160106/gdb/configure.ac 2016-01-08 19:16:02.656736257 +0100 +@@ -2077,6 +2077,10 @@ esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -111,11 +111,11 @@ Index: gdb-7.9.90.20150709/gdb/configure.ac dnl Handle optional features that can be enabled. # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, -Index: gdb-7.9.90.20150709/gdb/gdbserver/configure.ac +Index: gdb-7.10.50.20160106/gdb/gdbserver/configure.ac =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbserver/configure.ac 2015-07-09 18:24:13.707140401 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbserver/configure.ac 2015-07-09 18:24:24.913235990 +0200 -@@ -499,6 +499,10 @@ if $want_ipa ; then +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/configure.ac 2016-01-08 19:15:57.582707955 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/configure.ac 2016-01-08 19:16:02.656736257 +0100 +@@ -524,6 +524,10 @@ fi fi @@ -126,11 +126,11 @@ Index: gdb-7.9.90.20150709/gdb/gdbserver/configure.ac AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) AC_SUBST(srv_xmlbuiltin) -Index: gdb-7.9.90.20150709/gdb/gdbserver/linux-low.c +Index: gdb-7.10.50.20160106/gdb/gdbserver/linux-low.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbserver/linux-low.c 2015-07-09 18:24:13.709140418 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbserver/linux-low.c 2015-07-09 18:24:24.914235998 +0200 -@@ -755,6 +755,29 @@ add_lwp (ptid_t ptid) +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/linux-low.c 2016-01-08 19:15:57.585707972 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/linux-low.c 2016-01-08 19:16:02.658736268 +0100 +@@ -853,6 +853,29 @@ return lwp; } @@ -160,20 +160,20 @@ Index: gdb-7.9.90.20150709/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -778,7 +801,7 @@ linux_create_inferior (char *program, ch +@@ -876,7 +899,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); -Index: gdb-7.9.90.20150709/gdb/inf-ptrace.c + setpgid (0, 0); + +Index: gdb-7.10.50.20160106/gdb/inf-ptrace.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/inf-ptrace.c 2015-07-09 18:24:13.710140426 +0200 -+++ gdb-7.9.90.20150709/gdb/inf-ptrace.c 2015-07-09 18:24:24.915236007 +0200 -@@ -79,7 +79,15 @@ static void +--- gdb-7.10.50.20160106.orig/gdb/inf-ptrace.c 2016-01-08 19:15:57.586707977 +0100 ++++ gdb-7.10.50.20160106/gdb/inf-ptrace.c 2016-01-08 19:16:02.659736274 +0100 +@@ -79,7 +79,15 @@ inf_ptrace_me (void) { /* "Trace me, Dr. Memory!" */ @@ -189,11 +189,11 @@ Index: gdb-7.9.90.20150709/gdb/inf-ptrace.c } /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.9.90.20150709/gdb/linux-nat.c +Index: gdb-7.10.50.20160106/gdb/linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/linux-nat.c 2015-07-09 18:24:13.712140443 +0200 -+++ gdb-7.9.90.20150709/gdb/linux-nat.c 2015-07-09 18:24:24.916236015 +0200 -@@ -1184,6 +1184,7 @@ linux_nat_create_inferior (struct target +--- gdb-7.10.50.20160106.orig/gdb/linux-nat.c 2016-01-08 19:15:57.587707983 +0100 ++++ gdb-7.10.50.20160106/gdb/linux-nat.c 2016-01-08 19:16:02.660736279 +0100 +@@ -1016,6 +1016,7 @@ { struct cleanup *restore_personality = maybe_disable_address_space_randomization (disable_randomization); @@ -201,7 +201,7 @@ Index: gdb-7.9.90.20150709/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1191,7 +1192,28 @@ linux_nat_create_inferior (struct target +@@ -1023,7 +1024,28 @@ /* Make sure we report all signals during startup. */ linux_nat_pass_signals (ops, 0, NULL); @@ -231,10 +231,10 @@ Index: gdb-7.9.90.20150709/gdb/linux-nat.c do_cleanups (restore_personality); } -Index: gdb-7.9.90.20150709/gdb/config.in +Index: gdb-7.10.50.20160106/gdb/config.in =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/config.in 2015-07-09 18:24:13.713140452 +0200 -+++ gdb-7.9.90.20150709/gdb/config.in 2015-07-09 18:24:24.916236015 +0200 +--- gdb-7.10.50.20160106.orig/gdb/config.in 2016-01-08 19:15:57.588707989 +0100 ++++ gdb-7.10.50.20160106/gdb/config.in 2016-01-08 19:16:02.660736279 +0100 @@ -264,6 +264,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -255,11 +255,11 @@ Index: gdb-7.9.90.20150709/gdb/config.in /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -Index: gdb-7.9.90.20150709/gdb/configure +Index: gdb-7.10.50.20160106/gdb/configure =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/configure 2015-07-09 18:24:13.718140495 +0200 -+++ gdb-7.9.90.20150709/gdb/configure 2015-07-09 18:24:24.920236049 +0200 -@@ -14228,6 +14228,64 @@ cat >>confdefs.h <<_ACEOF +--- gdb-7.10.50.20160106.orig/gdb/configure 2016-01-08 19:15:57.593708017 +0100 ++++ gdb-7.10.50.20160106/gdb/configure 2016-01-08 19:16:02.665736307 +0100 +@@ -14653,6 +14653,64 @@ _ACEOF @@ -324,11 +324,11 @@ Index: gdb-7.9.90.20150709/gdb/configure # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, # except that the argument to --with-sysroot is optional. -Index: gdb-7.9.90.20150709/gdb/gdbserver/config.in +Index: gdb-7.10.50.20160106/gdb/gdbserver/config.in =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbserver/config.in 2015-07-09 18:24:13.719140503 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbserver/config.in 2015-07-09 18:24:24.920236049 +0200 -@@ -113,6 +113,9 @@ +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/config.in 2016-01-08 19:15:57.595708028 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/config.in 2016-01-08 19:16:02.665736307 +0100 +@@ -117,6 +117,9 @@ /* Define to 1 if you have the `mcheck' library (-lmcheck). */ #undef HAVE_LIBMCHECK @@ -338,21 +338,21 @@ Index: gdb-7.9.90.20150709/gdb/gdbserver/config.in /* Define if the target supports branch tracing. */ #undef HAVE_LINUX_BTRACE -@@ -189,6 +192,9 @@ - /* Define to 1 if you have the `setns' function. */ - #undef HAVE_SETNS +@@ -193,6 +196,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 + - /* Define to 1 if you have the header file. */ - #undef HAVE_SGTTY_H + /* Define to 1 if you have the `setns' function. */ + #undef HAVE_SETNS -Index: gdb-7.9.90.20150709/gdb/gdbserver/configure +Index: gdb-7.10.50.20160106/gdb/gdbserver/configure =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbserver/configure 2015-07-09 18:24:13.721140520 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbserver/configure 2015-07-09 18:24:24.922236066 +0200 -@@ -7022,6 +7022,64 @@ if $want_ipa ; then +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/configure 2016-01-08 19:15:57.597708039 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/configure 2016-01-08 19:16:02.667736318 +0100 +@@ -7311,6 +7311,64 @@ fi fi diff --git a/SOURCES/gdb-bz541866-rwatch-before-run.patch b/SOURCES/gdb-bz541866-rwatch-before-run.patch index 792b410..b657bd5 100644 --- a/SOURCES/gdb-bz541866-rwatch-before-run.patch +++ b/SOURCES/gdb-bz541866-rwatch-before-run.patch @@ -1,20 +1,20 @@ -Index: gdb-7.9.90.20150709/gdb/config/i386/linux64.mh +Index: gdb-7.10.90.20160211/gdb/config/i386/linux64.mh =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/config/i386/linux64.mh 2015-07-09 18:23:32.173786118 +0200 -+++ gdb-7.9.90.20150709/gdb/config/i386/linux64.mh 2015-07-09 18:23:51.823953736 +0200 -@@ -7,7 +7,7 @@ NATDEPFILES= inf-ptrace.o fork-child.o \ +--- gdb-7.10.90.20160211.orig/gdb/config/i386/linux64.mh 2016-02-11 20:56:32.470674877 +0100 ++++ gdb-7.10.90.20160211/gdb/config/i386/linux64.mh 2016-02-11 20:56:51.158797712 +0100 +@@ -7,7 +7,7 @@ linux-procfs.o linux-ptrace.o linux-btrace.o \ linux-waitpid.o linux-personality.o x86-linux.o \ - x86-linux-dregs.o linux-namespaces.o + x86-linux-dregs.o amd64-linux-siginfo.o linux-namespaces.o -NAT_FILE= config/nm-linux.h +NAT_FILE= nm-linux64.h NAT_CDEPS = $(srcdir)/proc-service.list # The dynamically loaded libthread_db needs access to symbols in the -Index: gdb-7.9.90.20150709/gdb/config/i386/linux.mh +Index: gdb-7.10.90.20160211/gdb/config/i386/linux.mh =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/config/i386/linux.mh 2015-07-09 18:23:30.527772078 +0200 -+++ gdb-7.9.90.20150709/gdb/config/i386/linux.mh 2015-07-09 18:23:32.174786127 +0200 +--- gdb-7.10.90.20160211.orig/gdb/config/i386/linux.mh 2016-02-11 20:56:26.925638430 +0100 ++++ gdb-7.10.90.20160211/gdb/config/i386/linux.mh 2016-02-11 20:56:32.471674884 +0100 @@ -1,6 +1,6 @@ # Host: Intel 386 running GNU/Linux. @@ -23,10 +23,10 @@ Index: gdb-7.9.90.20150709/gdb/config/i386/linux.mh NATDEPFILES= inf-ptrace.o fork-child.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.9.90.20150709/gdb/config/i386/nm-linux.h +Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.90.20150709/gdb/config/i386/nm-linux.h 2015-07-09 18:23:32.174786127 +0200 ++++ gdb-7.10.90.20160211/gdb/config/i386/nm-linux.h 2016-02-11 20:56:32.471674884 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux i386. + @@ -56,10 +56,10 @@ Index: gdb-7.9.90.20150709/gdb/config/i386/nm-linux.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.9.90.20150709/gdb/config/i386/nm-linux64.h +Index: gdb-7.10.90.20160211/gdb/config/i386/nm-linux64.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.90.20150709/gdb/config/i386/nm-linux64.h 2015-07-09 18:23:32.174786127 +0200 ++++ gdb-7.10.90.20160211/gdb/config/i386/nm-linux64.h 2016-02-11 20:56:32.471674884 +0100 @@ -0,0 +1,28 @@ +/* Native support for GNU/Linux amd64. + @@ -89,11 +89,11 @@ Index: gdb-7.9.90.20150709/gdb/config/i386/nm-linux64.h +#define target_can_use_hardware_watchpoint(type, cnt, ot) 1 + +#endif /* NM_LINUX64_H */ -Index: gdb-7.9.90.20150709/gdb/target.h +Index: gdb-7.10.90.20160211/gdb/target.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/target.h 2015-07-09 18:23:30.528772086 +0200 -+++ gdb-7.9.90.20150709/gdb/target.h 2015-07-09 18:23:32.175786135 +0200 -@@ -1849,9 +1849,11 @@ extern char *target_thread_name (struct +--- gdb-7.10.90.20160211.orig/gdb/target.h 2016-02-11 20:56:26.926638437 +0100 ++++ gdb-7.10.90.20160211/gdb/target.h 2016-02-11 20:56:32.472674890 +0100 +@@ -1924,9 +1924,11 @@ 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.9.90.20150709/gdb/target.h /* Returns the number of debug registers needed to watch the given memory region, or zero if not supported. */ -Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.90.20150709/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2015-07-09 18:23:32.175786135 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-02-11 20:56:32.472674890 +0100 @@ -0,0 +1,40 @@ +# Copyright 2009, 2010 Free Software Foundation, Inc. + @@ -149,4 +149,4 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp +} +gdb_test "" "main .* at .*" "start" + -+gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" ++gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" diff --git a/SOURCES/gdb-container-rh-pkg.patch b/SOURCES/gdb-container-rh-pkg.patch new file mode 100644 index 0000000..0b8a3a2 --- /dev/null +++ b/SOURCES/gdb-container-rh-pkg.patch @@ -0,0 +1,21 @@ +--- gdb-7.11/gdb/remote.c-orig 2016-04-06 17:46:52.428921496 +0200 ++++ gdb-7.11/gdb/remote.c 2016-04-06 18:28:26.781923516 +0200 +@@ -13002,7 +13002,17 @@ remote_pid_to_exec_file (struct target_o + char *annex = NULL; + + if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) +- return NULL; ++ { ++ warning (_("Remote gdbserver does not support determining executable " ++ "automatically.\n" ++"RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.\n" ++"The following versions of gdbserver support it:\n" ++"- Upstream version of gdbserver (unsupported) 7.10 or later\n" ++"- Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)\n" ++"- RHEL-7.3 versions of gdbserver (on any architecture)" ++)); ++ return NULL; ++ } + + if (filename != NULL) + xfree (filename); diff --git a/SOURCES/gdb-fedora-libncursesw.patch b/SOURCES/gdb-fedora-libncursesw.patch new file mode 100644 index 0000000..a2a2960 --- /dev/null +++ b/SOURCES/gdb-fedora-libncursesw.patch @@ -0,0 +1,63 @@ +Fedora: Force libncursesw over libncurses to match the includes. +https://bugzilla.redhat.com/show_bug.cgi?id=1270534 + +diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure gdb-7.10.50.20151113/gdb/configure +--- gdb-7.10.50.20151113-orig/gdb/configure 2015-11-14 16:14:04.404118312 +0100 ++++ gdb-7.10.50.20151113/gdb/configure 2015-11-14 16:17:59.074566047 +0100 +@@ -8463,6 +8463,7 @@ if test x"$prefer_curses" = xyes; then + # search /usr/local/include, if ncurses is installed in /usr/local. A + # default installation of ncurses on alpha*-dec-osf* will lead to such + # a situation. ++ # Fedora: Force libncursesw over libncurses to match the includes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 + $as_echo_n "checking for library containing waddstr... " >&6; } + if test "${ac_cv_search_waddstr+set}" = set; then : +@@ -8487,7 +8488,7 @@ return waddstr (); + return 0; + } + _ACEOF +-for ac_lib in '' ncurses cursesX curses; do ++for ac_lib in '' ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -8561,6 +8562,7 @@ case $host_os in + esac + + # These are the libraries checked by Readline. ++# Fedora: Force libncursesw over libncurses to match the includes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 + $as_echo_n "checking for library containing tgetent... " >&6; } + if test "${ac_cv_search_tgetent+set}" = set; then : +@@ -8585,7 +8587,7 @@ return tgetent (); + return 0; + } + _ACEOF +-for ac_lib in '' termcap tinfo curses ncurses; do ++for ac_lib in '' termcap tinfo ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else +diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure.ac gdb-7.10.50.20151113/gdb/configure.ac +--- gdb-7.10.50.20151113-orig/gdb/configure.ac 2015-11-14 16:14:04.404118312 +0100 ++++ gdb-7.10.50.20151113/gdb/configure.ac 2015-11-14 16:17:54.898540284 +0100 +@@ -771,7 +771,8 @@ if test x"$prefer_curses" = xyes; then + # search /usr/local/include, if ncurses is installed in /usr/local. A + # default installation of ncurses on alpha*-dec-osf* will lead to such + # a situation. +- AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses]) ++ # Fedora: Force libncursesw over libncurses to match the includes. ++ AC_SEARCH_LIBS(waddstr, [ncursesw]) + + if test "$ac_cv_search_waddstr" != no; then + curses_found=yes +@@ -813,7 +814,8 @@ case $host_os in + esac + + # These are the libraries checked by Readline. +-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses]) ++# Fedora: Force libncursesw over libncurses to match the includes. ++AC_SEARCH_LIBS(tgetent, [termcap tinfo ncursesw]) + + if test "$ac_cv_search_tgetent" = no; then + CONFIG_OBS="$CONFIG_OBS stub-termcap.o" diff --git a/SOURCES/gdb-fortran-stride-intel-1of6.patch b/SOURCES/gdb-fortran-stride-intel-1of6.patch new file mode 100644 index 0000000..b1c131d --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-1of6.patch @@ -0,0 +1,611 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00843.html +Subject: [PATCH v2 1/6] fortran: allow multi-dimensional subarrays + +From: Christoph Weinmann + +Add an argument count for subrange expressions in Fortran. +Based on the counted value calculate a new array with the +elements specified by the user. First parse the user input, +secondly copy the desired array values into the return +array, thirdly re-create the necessary ranges and bounds. + +1| program prog +2| integer :: ary(10,5) = (/ (i,i=1,10) (j, j=1,5) /) +3| end program prog + +(gdb) print ary(2:4,1:3) +old> Syntax error in expression near ':3' +new> $3 = ( ( 21, 31, 41) ( 22, 32, 42) ( 23, 33, 43) ) + +2013-11-25 Christoph Weinmann + + * eval.c (multi_f77_subscript): Remove function. + * eval.c (evaluate_subrange_expr): When evaluating + an array or string expression, call + value_f90_subarray. + * eval.c (value_f90_subarray): Add argument parsing + and compute result array based on user input. + * f-exp.y: Increment argument counter for every subrange + expression entered by the user. + * valops.c (value_slice): Call value_slice_1 with + additional default argument. + * valops.c (value_slice_1): Add functionality to + copy and return result values based on input. + * value.h: Add function definition. + + +Signed-off-by: Christoph Weinmann +--- + gdb/eval.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++------------- + gdb/f-exp.y | 2 + + gdb/valops.c | 157 ++++++++++++++++++++++++------ + gdb/value.h | 2 + + 4 files changed, 375 insertions(+), 95 deletions(-) + +diff --git a/gdb/eval.c b/gdb/eval.c +index 78ad946..c9f325f 100644 +--- a/gdb/eval.c ++++ b/gdb/eval.c +@@ -399,29 +399,253 @@ init_array_element (struct value *array, struct value *element, + return index; + } + ++/* Evaluates any operation on Fortran arrays or strings with at least ++ one user provided parameter. Expects the input ARRAY to be either ++ an array, or a string. Evaluates EXP by incrementing POS, and ++ writes the content from the elt stack into a local struct. NARGS ++ specifies number of literal or range arguments the user provided. ++ NARGS must be the same number as ARRAY has dimensions. */ ++ + static struct value * +-value_f90_subarray (struct value *array, +- struct expression *exp, int *pos, enum noside noside) ++value_f90_subarray (struct value *array, struct expression *exp, ++ int *pos, int nargs, enum noside noside) + { +- int pc = (*pos) + 1; ++ int i, dim_count = 0; + LONGEST low_bound, high_bound; + struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array))); +- enum f90_range_type range_type +- = (enum f90_range_type) longest_to_int (exp->elts[pc].longconst); +- +- *pos += 3; ++ struct value *new_array = array; ++ struct type *array_type = check_typedef (value_type (new_array)); ++ struct type *temp_type; ++ ++ /* Local struct to hold user data for Fortran subarray dimensions. */ ++ struct subscript_store ++ { ++ /* For every dimension, we are either working on a range or an index ++ expression, so we store this info separately for later. */ ++ enum ++ { ++ SUBSCRIPT_RANGE, /* e.g. "(lowbound:highbound)" */ ++ SUBSCRIPT_INDEX /* e.g. "(literal)" */ ++ } kind; ++ ++ /* We also store either the lower and upper bound info, or the index ++ number. Before evaluation of the input values, we do not know if we are ++ actually working on a range of ranges, or an index in a range. So as a ++ first step we store all input in a union. The array calculation itself ++ deals with this later on. */ ++ union ++ { ++ struct subscript_range ++ { ++ enum f90_range_type f90_range_type; ++ LONGEST low, high; ++ } ++ range; ++ LONGEST number; ++ }; ++ } *subscript_array; ++ ++ /* Check if the number of arguments provided by the user matches ++ the number of dimension of the array. A string has only one ++ dimension. */ ++ if (nargs != calc_f77_array_dims (value_type (new_array))) ++ error (_("Wrong number of subscripts")); ++ ++ subscript_array = alloca (sizeof (*subscript_array) * nargs); ++ ++ /* Parse the user input into the SUBSCRIPT_ARRAY to store it. We need ++ to evaluate it first, as the input is from left-to-right. The ++ array is stored from right-to-left. So we have to use the user ++ input in reverse order. Later on, we need the input information to ++ re-calculate the output array. For multi-dimensional arrays, we ++ can be dealing with any possible combination of ranges and indices ++ for every dimension. */ ++ for (i = 0; i < nargs; i++) ++ { ++ struct subscript_store *index = &subscript_array[i]; + +- if (range_type == LOW_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) +- low_bound = TYPE_LOW_BOUND (range); +- else +- low_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); ++ /* The user input is a range, with or without lower and upper bound. ++ E.g.: "p arry(2:5)", "p arry( :5)", "p arry( : )", etc. */ ++ if (exp->elts[*pos].opcode == OP_F90_RANGE) ++ { ++ int pc = (*pos) + 1; ++ struct subscript_range *range; ++ ++ index->kind = SUBSCRIPT_RANGE; ++ range = &index->range; ++ ++ *pos += 3; ++ range->f90_range_type = longest_to_int (exp->elts[pc].longconst); ++ ++ /* If a lower bound was provided by the user, the bit has been ++ set and we can assign the value from the elt stack. Same for ++ upper bound. */ ++ if ((range->f90_range_type == HIGH_BOUND_DEFAULT) ++ || range->f90_range_type == NONE_BOUND_DEFAULT) ++ range->low = value_as_long (evaluate_subexp (NULL_TYPE, exp, ++ pos, noside)); ++ if ((range->f90_range_type == LOW_BOUND_DEFAULT) ++ || range->f90_range_type == NONE_BOUND_DEFAULT) ++ range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp, ++ pos, noside)); ++ } ++ /* User input is an index. E.g.: "p arry(5)". */ ++ else ++ { ++ struct value *val; + +- if (range_type == HIGH_BOUND_DEFAULT || range_type == BOTH_BOUND_DEFAULT) +- high_bound = TYPE_HIGH_BOUND (range); +- else +- high_bound = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside)); ++ index->kind = SUBSCRIPT_INDEX; ++ ++ /* Evaluate each subscript; it must be a legal integer in F77. This ++ ensures the validity of the provided index. */ ++ val = evaluate_subexp_with_coercion (exp, pos, noside); ++ index->number = value_as_long (val); ++ } ++ ++ } ++ ++ /* Traverse the array from right to left and evaluate each corresponding ++ user input. VALUE_SUBSCRIPT is called for every index, until a range ++ expression is evaluated. After a range expression has been evaluated, ++ every subsequent expression is also treated as a range. */ ++ for (i = nargs - 1; i >= 0; i--) ++ { ++ struct subscript_store *index = &subscript_array[i]; ++ struct type *index_type = TYPE_INDEX_TYPE (array_type); ++ ++ switch (index->kind) ++ { ++ case SUBSCRIPT_RANGE: ++ { ++ ++ /* When we hit the first range specified by the user, we must ++ treat any subsequent user entry as a range. We simply ++ increment DIM_COUNT which tells us how many times we are ++ calling VALUE_SLICE_1. */ ++ struct subscript_range *range = &index->range; ++ ++ /* If no lower bound was provided by the user, we take the ++ default boundary. Same for the high bound. */ ++ if ((range->f90_range_type == LOW_BOUND_DEFAULT) ++ || (range->f90_range_type == BOTH_BOUND_DEFAULT)) ++ range->low = TYPE_LOW_BOUND (index_type); ++ ++ if ((range->f90_range_type == HIGH_BOUND_DEFAULT) ++ || (range->f90_range_type == BOTH_BOUND_DEFAULT)) ++ range->high = TYPE_HIGH_BOUND (index_type); ++ ++ /* Both user provided low and high bound have to be inside the ++ array bounds. Throw an error if not. */ ++ if (range->low < TYPE_LOW_BOUND (index_type) ++ || range->low > TYPE_HIGH_BOUND (index_type) ++ || range->high < TYPE_LOW_BOUND (index_type) ++ || range->high > TYPE_HIGH_BOUND (index_type)) ++ error (_("provided bound(s) outside array bound(s)")); ++ ++ /* DIM_COUNT counts every user argument that is treated as a range. ++ This is necessary for expressions like 'print array(7, 8:9). ++ Here the first argument is a literal, but must be treated as a ++ range argument to allow the correct output representation. */ ++ dim_count++; ++ ++ new_array ++ = value_slice_1 (new_array, ++ longest_to_int (range->low), ++ longest_to_int (range->high - range->low + 1), ++ dim_count); ++ } ++ break; ++ ++ case SUBSCRIPT_INDEX: ++ { ++ /* DIM_COUNT only stays '0' when no range argument was processed ++ before, starting from the last dimension. This way we can ++ reduce the number of dimensions from the result array. ++ However, if a range has been processed before an index, we ++ treat the index like a range with equal low- and high bounds ++ to get the value offset right. */ ++ if (dim_count == 0) ++ new_array ++ = value_subscripted_rvalue (new_array, index->number, ++ f77_get_lowerbound (value_type ++ (new_array))); ++ else ++ { ++ /* Check for valid index input. */ ++ if (index->number < TYPE_LOW_BOUND (index_type) ++ || index->number > TYPE_HIGH_BOUND (index_type)) ++ error (_("error no such vector element")); ++ ++ dim_count++; ++ new_array = value_slice_1 (new_array, ++ longest_to_int (index->number), ++ 1, /* length is '1' element */ ++ dim_count); ++ } ++ ++ } ++ break; ++ } ++ } ++ ++ /* With DIM_COUNT > 1 we currently have a one dimensional array, but expect ++ an array of arrays, depending on how many ranges have been provided by ++ the user. So we need to rebuild the array dimensions for printing it ++ correctly. ++ Starting from right to left in the user input, after we hit the first ++ range argument every subsequent argument is also treated as a range. ++ E.g.: ++ "p ary(3, 7, 2:15)" in Fortran has only 1 dimension, but we calculated 3 ++ ranges. ++ "p ary(3, 7:12, 4)" in Fortran has only 1 dimension, but we calculated 2 ++ ranges. ++ "p ary(2:4, 5, 7)" in Fortran has only 1 dimension, and we calculated 1 ++ range. */ ++ if (dim_count > 1) ++ { ++ struct value *v = NULL; + +- return value_slice (array, low_bound, high_bound - low_bound + 1); ++ temp_type = TYPE_TARGET_TYPE (value_type (new_array)); ++ ++ /* Every SUBSCRIPT_RANGE in the user input signifies an actual range in ++ the output array. So we traverse the SUBSCRIPT_ARRAY again, looking ++ for a range entry. When we find one, we use the range info to create ++ an additional range_type to set the correct bounds and dimensions for ++ the output array. */ ++ for (i = 0; i < nargs; i++) ++ { ++ struct subscript_store *index = &subscript_array[i]; ++ ++ if (index->kind == SUBSCRIPT_RANGE) ++ { ++ struct type *range_type, *interim_array_type; ++ ++ range_type ++ = create_static_range_type (NULL, ++ temp_type, ++ 1, ++ index->range.high - index->range.low + 1); ++ ++ interim_array_type = create_array_type (NULL, ++ temp_type, ++ range_type); ++ ++ /* For some reason the type code of the contents is missing, so ++ reset it from the original array. */ ++ TYPE_CODE (interim_array_type) ++ = TYPE_CODE (value_type (new_array)); ++ ++ v = allocate_value (interim_array_type); ++ ++ temp_type = value_type (v); ++ } ++ ++ } ++ value_contents_copy (v, 0, new_array, 0, TYPE_LENGTH (temp_type)); ++ return v; ++ } ++ ++ return new_array; + } + + +@@ -1810,14 +2034,11 @@ evaluate_subexp_standard (struct type *expect_type, + switch (code) + { + case TYPE_CODE_ARRAY: +- if (exp->elts[*pos].opcode == OP_F90_RANGE) +- return value_f90_subarray (arg1, exp, pos, noside); +- else +- goto multi_f77_subscript; ++ return value_f90_subarray (arg1, exp, pos, nargs, noside); + + case TYPE_CODE_STRING: + if (exp->elts[*pos].opcode == OP_F90_RANGE) +- return value_f90_subarray (arg1, exp, pos, noside); ++ return value_f90_subarray (arg1, exp, pos, 1, noside); + else + { + arg2 = evaluate_subexp_with_coercion (exp, pos, noside); +@@ -2222,49 +2443,6 @@ evaluate_subexp_standard (struct type *expect_type, + } + return (arg1); + +- multi_f77_subscript: +- { +- LONGEST subscript_array[MAX_FORTRAN_DIMS]; +- int ndimensions = 1, i; +- struct value *array = arg1; +- +- if (nargs > MAX_FORTRAN_DIMS) +- error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS); +- +- ndimensions = calc_f77_array_dims (type); +- +- if (nargs != ndimensions) +- error (_("Wrong number of subscripts")); +- +- gdb_assert (nargs > 0); +- +- /* Now that we know we have a legal array subscript expression +- let us actually find out where this element exists in the array. */ +- +- /* Take array indices left to right. */ +- for (i = 0; i < nargs; i++) +- { +- /* Evaluate each subscript; it must be a legal integer in F77. */ +- arg2 = evaluate_subexp_with_coercion (exp, pos, noside); +- +- /* Fill in the subscript array. */ +- +- subscript_array[i] = value_as_long (arg2); +- } +- +- /* Internal type of array is arranged right to left. */ +- for (i = nargs; i > 0; i--) +- { +- struct type *array_type = check_typedef (value_type (array)); +- LONGEST index = subscript_array[i - 1]; +- +- array = value_subscripted_rvalue (array, index, +- f77_get_lowerbound (array_type)); +- } +- +- return array; +- } +- + case BINOP_LOGICAL_AND: + arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); + if (noside == EVAL_SKIP) +@@ -3121,6 +3299,9 @@ calc_f77_array_dims (struct type *array_type) + int ndimen = 1; + struct type *tmp_type; + ++ if (TYPE_CODE (array_type) == TYPE_CODE_STRING) ++ return 1; ++ + if ((TYPE_CODE (array_type) != TYPE_CODE_ARRAY)) + error (_("Can't get dimensions for a non-array type")); + +diff --git a/gdb/f-exp.y b/gdb/f-exp.y +index 4faac32..9343abb 100644 +--- a/gdb/f-exp.y ++++ b/gdb/f-exp.y +@@ -308,6 +308,8 @@ arglist : subrange + + arglist : arglist ',' exp %prec ABOVE_COMMA + { arglist_len++; } ++ | arglist ',' subrange %prec ABOVE_COMMA ++ { arglist_len++; } + ; + + /* There are four sorts of subrange types in F90. */ +diff --git a/gdb/valops.c b/gdb/valops.c +index 5a244a9..09ea877 100644 +--- a/gdb/valops.c ++++ b/gdb/valops.c +@@ -3759,56 +3759,151 @@ value_of_this_silent (const struct language_defn *lang) + struct value * + value_slice (struct value *array, int lowbound, int length) + { ++ /* Pass unaltered arguments to VALUE_SLICE_1, plus a CALL_COUNT of '1' as we ++ are only considering the highest dimension, or we are working on a one ++ dimensional array. So we call VALUE_SLICE_1 exactly once. */ ++ return value_slice_1 (array, lowbound, length, 1); ++} ++ ++/* CALL_COUNT is used to determine if we are calling the function once, e.g. ++ we are working on the current dimension of ARRAY, or if we are calling ++ the function repeatedly. In the later case we need to take elements ++ from the TARGET_TYPE of ARRAY. ++ With a CALL_COUNT greater than 1 we calculate the offsets for every element ++ that should be in the result array. Then we fetch the contents and then ++ copy them into the result array. The result array will have one dimension ++ less than the input array, so later on we need to recreate the indices and ++ ranges in the calling function. */ ++ ++struct value * ++value_slice_1 (struct value *array, int lowbound, int length, int call_count) ++{ + struct type *slice_range_type, *slice_type, *range_type; +- LONGEST lowerbound, upperbound; +- struct value *slice; +- struct type *array_type; ++ struct type *array_type = check_typedef (value_type (array)); ++ struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); ++ unsigned int elt_size, elt_offs; ++ LONGEST elt_stride, ary_high_bound, ary_low_bound; ++ struct value *v; ++ int slice_range_size, i = 0, row_count = 1, elem_count = 1; + +- array_type = check_typedef (value_type (array)); ++ /* Check for legacy code if we are actually dealing with an array or ++ string. */ + if (TYPE_CODE (array_type) != TYPE_CODE_ARRAY + && TYPE_CODE (array_type) != TYPE_CODE_STRING) + error (_("cannot take slice of non-array")); + +- range_type = TYPE_INDEX_TYPE (array_type); +- if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0) +- error (_("slice from bad array or bitstring")); ++ ary_low_bound = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (array_type)); ++ ary_high_bound = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (array_type)); ++ ++ /* When we are working on a multi-dimensional array, we need to get the ++ attributes of the underlying type. */ ++ if (call_count > 1) ++ { ++ elt_type = check_typedef (TYPE_TARGET_TYPE (elt_type)); ++ row_count = TYPE_LENGTH (array_type) ++ / TYPE_LENGTH (TYPE_TARGET_TYPE (array_type)); ++ } ++ ++ elem_count = length; ++ elt_size = TYPE_LENGTH (elt_type); ++ elt_offs = longest_to_int (lowbound - ary_low_bound); ++ elt_stride = TYPE_LENGTH (TYPE_INDEX_TYPE (array_type)); ++ ++ elt_offs *= elt_size; ++ ++ /* Check for valid user input. In case of Fortran this was already done ++ in the calling function. */ ++ if (call_count == 1 ++ && (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) ++ && elt_offs >= TYPE_LENGTH (array_type))) ++ error (_("no such vector element")); + +- if (lowbound < lowerbound || length < 0 +- || lowbound + length - 1 > upperbound) +- error (_("slice out of range")); ++ /* CALL_COUNT is 1 when we are dealing either with the highest dimension ++ of the array, or a one dimensional array. Set RANGE_TYPE accordingly. ++ In both cases we calculate how many rows/elements will be in the output ++ array by setting slice_range_size. */ ++ if (call_count == 1) ++ { ++ range_type = TYPE_INDEX_TYPE (array_type); ++ slice_range_size = elem_count; ++ ++ /* Check if the array bounds are valid. */ ++ if (get_discrete_bounds (range_type, &ary_low_bound, &ary_high_bound) < 0) ++ error (_("slice from bad array or bitstring")); ++ } ++ /* When CALL_COUNT is greater than 1, we are dealing with an array of arrays. ++ So we need to get the type below the current one and set the RANGE_TYPE ++ accordingly. */ ++ else ++ { ++ range_type = TYPE_INDEX_TYPE (TYPE_TARGET_TYPE (array_type)); ++ slice_range_size = (ary_low_bound + row_count - 1) * (elem_count); ++ ary_low_bound = TYPE_LOW_BOUND (range_type); ++ } + + /* FIXME-type-allocation: need a way to free this type when we are +- done with it. */ +- slice_range_type = create_static_range_type ((struct type *) NULL, +- TYPE_TARGET_TYPE (range_type), +- lowbound, +- lowbound + length - 1); ++ done with it. */ + ++ slice_range_type = create_static_range_type (NULL, TYPE_TARGET_TYPE (range_type), ++ ary_low_bound, slice_range_size); + { +- struct type *element_type = TYPE_TARGET_TYPE (array_type); +- LONGEST offset +- = (lowbound - lowerbound) * TYPE_LENGTH (check_typedef (element_type)); ++ struct type *element_type; ++ ++ /* When CALL_COUNT equals 1 we can use the legacy code for subarrays. */ ++ if (call_count == 1) ++ { ++ element_type = TYPE_TARGET_TYPE (array_type); + +- slice_type = create_array_type ((struct type *) NULL, +- element_type, +- slice_range_type); +- TYPE_CODE (slice_type) = TYPE_CODE (array_type); ++ slice_type = create_array_type (NULL, element_type, slice_range_type); ++ ++ TYPE_CODE (slice_type) = TYPE_CODE (array_type); ++ ++ if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) ++ v = allocate_value_lazy (slice_type); ++ else ++ { ++ v = allocate_value (slice_type); ++ value_contents_copy (v, ++ value_embedded_offset (v), ++ array, ++ value_embedded_offset (array) + elt_offs, ++ elt_size * longest_to_int (length)); ++ } + +- if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) +- slice = allocate_value_lazy (slice_type); ++ } ++ /* When CALL_COUNT is larger than 1 we are working on a range of ranges. ++ So we copy the relevant elements into the new array we return. */ + else + { +- slice = allocate_value (slice_type); +- value_contents_copy (slice, 0, array, offset, +- type_length_units (slice_type)); ++ LONGEST dst_offset = 0; ++ LONGEST src_row_length = TYPE_LENGTH (TYPE_TARGET_TYPE (array_type)); ++ ++ element_type = TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (array_type)); ++ slice_type = create_array_type (NULL, element_type, slice_range_type); ++ ++ TYPE_CODE (slice_type) = TYPE_CODE (TYPE_TARGET_TYPE (array_type)); ++ ++ v = allocate_value (slice_type); ++ for (i = 0; i < longest_to_int (row_count); i++) ++ { ++ /* Fetches the contents of ARRAY and copies them into V. */ ++ value_contents_copy (v, ++ dst_offset, ++ array, ++ elt_offs, ++ elt_size * elem_count); ++ elt_offs += src_row_length; ++ dst_offset += elt_size * elem_count; ++ } + } + +- set_value_component_location (slice, array); +- VALUE_FRAME_ID (slice) = VALUE_FRAME_ID (array); +- set_value_offset (slice, value_offset (array) + offset); ++ set_value_component_location (v, array); ++ VALUE_REGNUM (v) = VALUE_REGNUM (array); ++ VALUE_FRAME_ID (v) = VALUE_FRAME_ID (array); ++ set_value_offset (v, value_offset (array) + elt_offs); + } + +- return slice; ++ return v; + } + + /* Create a value for a FORTRAN complex number. Currently most of the +diff --git a/gdb/value.h b/gdb/value.h +index 2eac5ef..3400460 100644 +--- a/gdb/value.h ++++ b/gdb/value.h +@@ -1056,6 +1056,8 @@ extern struct value *varying_to_slice (struct value *); + + extern struct value *value_slice (struct value *, int, int); + ++extern struct value *value_slice_1 (struct value *, int, int, int); ++ + extern struct value *value_literal_complex (struct value *, struct value *, + struct type *); + +-- +2.5.0 + diff --git a/SOURCES/gdb-fortran-stride-intel-2of6.patch b/SOURCES/gdb-fortran-stride-intel-2of6.patch new file mode 100644 index 0000000..bf48143 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-2of6.patch @@ -0,0 +1,45 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00841.html +Subject: [PATCH v2 2/6] fortran: combine subarray and string computation + +From: Christoph Weinmann + +Strings only have one dimension, but the element computation is +identical to the subarray computation for ranges and indices. + +2013-11-26 Christoph Weinmann + + * eval.c (evaluate_subexp_standard): Call + value_f90_subarray for print expressions on array and + string types. + + +Signed-off-by: Christoph Weinmann +--- + gdb/eval.c | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/gdb/eval.c b/gdb/eval.c +index c9f325f..164d7ab 100644 +--- a/gdb/eval.c ++++ b/gdb/eval.c +@@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type, + switch (code) + { + case TYPE_CODE_ARRAY: +- return value_f90_subarray (arg1, exp, pos, nargs, noside); +- + case TYPE_CODE_STRING: +- if (exp->elts[*pos].opcode == OP_F90_RANGE) +- return value_f90_subarray (arg1, exp, pos, 1, noside); +- else +- { +- arg2 = evaluate_subexp_with_coercion (exp, pos, noside); +- return value_subscript (arg1, value_as_long (arg2)); +- } ++ return value_f90_subarray (arg1, exp, pos, nargs, noside); + + case TYPE_CODE_PTR: + case TYPE_CODE_FUNC: +-- +2.5.0 + diff --git a/SOURCES/gdb-fortran-stride-intel-3of6.patch b/SOURCES/gdb-fortran-stride-intel-3of6.patch new file mode 100644 index 0000000..50a6582 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-3of6.patch @@ -0,0 +1,162 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00845.html +Subject: [PATCH v2 3/6] fortran: change subrange enum to bit field + +From: Christoph Weinmann + +Change Fortran subrange enum for subrange expressions to +represent a bitfield for easier manipulation. Consequently +also change occurences and evaluation of said enum. The +behaviour of GDB is unchanged. + +2013-11-27 Christoph Weinmann + + * eval.c (value_f90_subarray): Change evaluation of the + subarray boundaries. Set boundaries to be either user + provided (bit in f90_range_type was set) or take the + default value if the boundary was not provided by the user. + * f-exp.y (subrange): Change rules for subrange expressions + to write the relevant bit sequence onto the elt stack. + * f-lang.h (f90_range_type): Change the enum to use bit + values for each boundary, if set by the user. + * parse.c (operator_length_standard): In case of + OP_F90_RANGE change the calculation of the number of + arguments on the elt stack, depending on the number of + boundaries provided by the user. + + +Signed-off-by: Christoph Weinmann +--- + gdb/eval.c | 14 ++++++-------- + gdb/f-exp.y | 11 ++++++----- + gdb/f-lang.h | 6 ++---- + gdb/parse.c | 21 ++++++++------------- + 4 files changed, 22 insertions(+), 30 deletions(-) + +diff --git a/gdb/eval.c b/gdb/eval.c +index 164d7ab..9b8b051 100644 +--- a/gdb/eval.c ++++ b/gdb/eval.c +@@ -480,12 +480,12 @@ value_f90_subarray (struct value *array, struct expression *exp, + /* If a lower bound was provided by the user, the bit has been + set and we can assign the value from the elt stack. Same for + upper bound. */ +- if ((range->f90_range_type == HIGH_BOUND_DEFAULT) +- || range->f90_range_type == NONE_BOUND_DEFAULT) ++ if ((range->f90_range_type & SUBARRAY_LOW_BOUND) ++ == SUBARRAY_LOW_BOUND) + range->low = value_as_long (evaluate_subexp (NULL_TYPE, exp, + pos, noside)); +- if ((range->f90_range_type == LOW_BOUND_DEFAULT) +- || range->f90_range_type == NONE_BOUND_DEFAULT) ++ if ((range->f90_range_type & SUBARRAY_HIGH_BOUND) ++ == SUBARRAY_HIGH_BOUND) + range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp, + pos, noside)); + } +@@ -526,12 +526,10 @@ value_f90_subarray (struct value *array, struct expression *exp, + + /* If no lower bound was provided by the user, we take the + default boundary. Same for the high bound. */ +- if ((range->f90_range_type == LOW_BOUND_DEFAULT) +- || (range->f90_range_type == BOTH_BOUND_DEFAULT)) ++ if ((range->f90_range_type & SUBARRAY_LOW_BOUND) == 0) + range->low = TYPE_LOW_BOUND (index_type); + +- if ((range->f90_range_type == HIGH_BOUND_DEFAULT) +- || (range->f90_range_type == BOTH_BOUND_DEFAULT)) ++ if ((range->f90_range_type & SUBARRAY_HIGH_BOUND) == 0) + range->high = TYPE_HIGH_BOUND (index_type); + + /* Both user provided low and high bound have to be inside the +diff --git a/gdb/f-exp.y b/gdb/f-exp.y +index 9343abb..b1206de 100644 +--- a/gdb/f-exp.y ++++ b/gdb/f-exp.y +@@ -315,26 +315,27 @@ arglist : arglist ',' exp %prec ABOVE_COMMA + /* There are four sorts of subrange types in F90. */ + + subrange: exp ':' exp %prec ABOVE_COMMA +- { write_exp_elt_opcode (pstate, OP_F90_RANGE); +- write_exp_elt_longcst (pstate, NONE_BOUND_DEFAULT); ++ { write_exp_elt_opcode (pstate, OP_F90_RANGE); ++ write_exp_elt_longcst (pstate, ++ SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND); + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + + subrange: exp ':' %prec ABOVE_COMMA + { write_exp_elt_opcode (pstate, OP_F90_RANGE); +- write_exp_elt_longcst (pstate, HIGH_BOUND_DEFAULT); ++ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND); + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + + subrange: ':' exp %prec ABOVE_COMMA + { write_exp_elt_opcode (pstate, OP_F90_RANGE); +- write_exp_elt_longcst (pstate, LOW_BOUND_DEFAULT); ++ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND); + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + + subrange: ':' %prec ABOVE_COMMA + { write_exp_elt_opcode (pstate, OP_F90_RANGE); +- write_exp_elt_longcst (pstate, BOTH_BOUND_DEFAULT); ++ write_exp_elt_longcst (pstate, 0); + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + +diff --git a/gdb/f-lang.h b/gdb/f-lang.h +index eeca107..4d56bf7 100644 +--- a/gdb/f-lang.h ++++ b/gdb/f-lang.h +@@ -44,10 +44,8 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, + + enum f90_range_type + { +- BOTH_BOUND_DEFAULT, /* "(:)" */ +- LOW_BOUND_DEFAULT, /* "(:high)" */ +- HIGH_BOUND_DEFAULT, /* "(low:)" */ +- NONE_BOUND_DEFAULT /* "(low:high)" */ ++ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */ ++ SUBARRAY_HIGH_BOUND = 0x2 /* "(:high)" */ + }; + + /* A common block. */ +diff --git a/gdb/parse.c b/gdb/parse.c +index 4191fc6..d500279 100644 +--- a/gdb/parse.c ++++ b/gdb/parse.c +@@ -1006,22 +1006,17 @@ operator_length_standard (const struct expression *expr, int endpos, + + case OP_F90_RANGE: + oplen = 3; ++ args = 0; + range_type = (enum f90_range_type) + longest_to_int (expr->elts[endpos - 2].longconst); + +- switch (range_type) +- { +- case LOW_BOUND_DEFAULT: +- case HIGH_BOUND_DEFAULT: +- args = 1; +- break; +- case BOTH_BOUND_DEFAULT: +- args = 0; +- break; +- case NONE_BOUND_DEFAULT: +- args = 2; +- break; +- } ++ /* Increment the argument counter for each argument ++ provided by the user. */ ++ if ((range_type & SUBARRAY_LOW_BOUND) == SUBARRAY_LOW_BOUND) ++ args++; ++ ++ if ((range_type & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND) ++ args++; + + break; + +-- +2.5.0 + diff --git a/SOURCES/gdb-fortran-stride-intel-4of6.patch b/SOURCES/gdb-fortran-stride-intel-4of6.patch new file mode 100644 index 0000000..6563d71 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-4of6.patch @@ -0,0 +1,142 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00842.html +Subject: [PATCH v2 4/6] fortran: enable parsing of stride parameter for subranges + +From: Christoph Weinmann + +Allow the user to provide a stride parameter for Fortran +subarrays. The stride parameter can be any integer except +'0'. The default stride value is '1'. + +2013-11-27 Christoph Weinmann + + * eval.c (value_f90_subarray): Add expression evaluation + for a stride parameter in a Fortran range expression. + * f-exp.y: Add yacc rules for writing info on the elt stack + when the user provided a stride argument. + * f-lang.h (F90_RANGE): Add field to enum to show when a + stride was provided by the user. + * parse.c (operator_length_standard): Check if a stride + value was provided, and increment argument counter + accordingly. + + +Signed-off-by: Christoph Weinmann +--- + gdb/eval.c | 10 +++++++++- + gdb/f-exp.y | 33 +++++++++++++++++++++++++++++++-- + gdb/f-lang.h | 5 +++-- + gdb/parse.c | 3 +++ + 4 files changed, 46 insertions(+), 5 deletions(-) + +diff --git a/gdb/eval.c b/gdb/eval.c +index 9b8b051..308ada3 100644 +--- a/gdb/eval.c ++++ b/gdb/eval.c +@@ -438,7 +438,7 @@ value_f90_subarray (struct value *array, struct expression *exp, + struct subscript_range + { + enum f90_range_type f90_range_type; +- LONGEST low, high; ++ LONGEST low, high, stride; + } + range; + LONGEST number; +@@ -488,6 +488,14 @@ value_f90_subarray (struct value *array, struct expression *exp, + == SUBARRAY_HIGH_BOUND) + range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp, + pos, noside)); ++ ++ /* Assign the user's stride value if provided. */ ++ if ((range->f90_range_type & SUBARRAY_STRIDE) == SUBARRAY_STRIDE) ++ range->stride = value_as_long (evaluate_subexp (NULL_TYPE, exp, ++ pos, noside)); ++ /* Assign the default stride value '1'. */ ++ else ++ range->stride = 1; + } + /* User input is an index. E.g.: "p arry(5)". */ + else +diff --git a/gdb/f-exp.y b/gdb/f-exp.y +index b1206de..5151fee 100644 +--- a/gdb/f-exp.y ++++ b/gdb/f-exp.y +@@ -316,8 +316,8 @@ arglist : arglist ',' exp %prec ABOVE_COMMA + + subrange: exp ':' exp %prec ABOVE_COMMA + { write_exp_elt_opcode (pstate, OP_F90_RANGE); +- write_exp_elt_longcst (pstate, +- SUBARRAY_LOW_BOUND | SUBARRAY_HIGH_BOUND); ++ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND ++ | SUBARRAY_HIGH_BOUND); + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + +@@ -339,6 +339,35 @@ subrange: ':' %prec ABOVE_COMMA + write_exp_elt_opcode (pstate, OP_F90_RANGE); } + ; + ++/* Each subrange type can have a stride argument. */ ++subrange: exp ':' exp ':' exp %prec ABOVE_COMMA ++ { write_exp_elt_opcode (pstate, OP_F90_RANGE); ++ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND ++ | SUBARRAY_HIGH_BOUND ++ | SUBARRAY_STRIDE); ++ write_exp_elt_opcode (pstate, OP_F90_RANGE); } ++ ; ++ ++subrange: exp ':' ':' exp %prec ABOVE_COMMA ++ { write_exp_elt_opcode (pstate, OP_F90_RANGE); ++ write_exp_elt_longcst (pstate, SUBARRAY_LOW_BOUND ++ | SUBARRAY_STRIDE); ++ write_exp_elt_opcode (pstate, OP_F90_RANGE); } ++ ; ++ ++subrange: ':' exp ':' exp %prec ABOVE_COMMA ++ { write_exp_elt_opcode (pstate, OP_F90_RANGE); ++ write_exp_elt_longcst (pstate, SUBARRAY_HIGH_BOUND ++ | SUBARRAY_STRIDE); ++ write_exp_elt_opcode (pstate, OP_F90_RANGE); } ++ ; ++ ++subrange: ':' ':' exp %prec ABOVE_COMMA ++ { write_exp_elt_opcode (pstate, OP_F90_RANGE); ++ write_exp_elt_longcst (pstate, SUBARRAY_STRIDE); ++ write_exp_elt_opcode (pstate, OP_F90_RANGE); } ++ ; ++ + complexnum: exp ',' exp + { } + ; +diff --git a/gdb/f-lang.h b/gdb/f-lang.h +index 4d56bf7..0ad57af 100644 +--- a/gdb/f-lang.h ++++ b/gdb/f-lang.h +@@ -44,8 +44,9 @@ extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR, + + enum f90_range_type + { +- SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" */ +- SUBARRAY_HIGH_BOUND = 0x2 /* "(:high)" */ ++ SUBARRAY_LOW_BOUND = 0x1, /* "(low:)" or "(low::)" */ ++ SUBARRAY_HIGH_BOUND = 0x2, /* "(:high)" or "(:high:)" */ ++ SUBARRAY_STRIDE = 0x4 /* "(::stride)" */ + }; + + /* A common block. */ +diff --git a/gdb/parse.c b/gdb/parse.c +index d500279..07248c3 100644 +--- a/gdb/parse.c ++++ b/gdb/parse.c +@@ -1018,6 +1018,9 @@ operator_length_standard (const struct expression *expr, int endpos, + if ((range_type & SUBARRAY_HIGH_BOUND) == SUBARRAY_HIGH_BOUND) + args++; + ++ if ((range_type & SUBARRAY_STRIDE) == SUBARRAY_STRIDE) ++ args++; ++ + break; + + default: +-- +2.5.0 + diff --git a/SOURCES/gdb-fortran-stride-intel-5of6.patch b/SOURCES/gdb-fortran-stride-intel-5of6.patch new file mode 100644 index 0000000..9a7dba3 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-5of6.patch @@ -0,0 +1,412 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00844.html +Subject: [PATCH v2 5/6] fortran: calculate subarray with stride values. + +From: Christoph Weinmann + +Calculate elements of a subarray using a provided stride value +The stride value can be a positive or negative integer, but may +not be zero. If no stride is provided, use the default value +1 to print all elements inside the range. + +1| program prog +2| integer :: ary(10) = (/ (i, i=1, 10) /) +3| end program prog + +(gdb) print ary(1:10:2) +$3 = (1, 3, 5, 7, 9) + +2013-11-27 Christoph Weinmann + + * eval.c (value_f90_subarray): Add range size calculation + for stride based ranges, and evaluation of user stride + parameters. Add check for matching user input to array + bounds. + * valops.c (value_slice): Add call parameter with default + stride value for calling value_slice_1. + * valops.c (value_slice_1): Add function parameter for + stride length in the return subarray. Calculate array + elements based on stride value. + * value.h: Add stride parameter to declaration of + value_slice_1. + + +Signed-off-by: Christoph Weinmann +--- + gdb/eval.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++------------- + gdb/valops.c | 87 +++++++++++++++++++++++++++++++++------------- + gdb/value.h | 2 +- + 3 files changed, 152 insertions(+), 48 deletions(-) + +diff --git a/gdb/eval.c b/gdb/eval.c +index 308ada3..d01b579 100644 +--- a/gdb/eval.c ++++ b/gdb/eval.c +@@ -437,8 +437,8 @@ value_f90_subarray (struct value *array, struct expression *exp, + { + struct subscript_range + { +- enum f90_range_type f90_range_type; +- LONGEST low, high, stride; ++ enum f90_range_type f90_range_type; ++ LONGEST low, high, stride; + } + range; + LONGEST number; +@@ -475,7 +475,7 @@ value_f90_subarray (struct value *array, struct expression *exp, + range = &index->range; + + *pos += 3; +- range->f90_range_type = longest_to_int (exp->elts[pc].longconst); ++ range->f90_range_type = exp->elts[pc].longconst; + + /* If a lower bound was provided by the user, the bit has been + set and we can assign the value from the elt stack. Same for +@@ -484,6 +484,7 @@ value_f90_subarray (struct value *array, struct expression *exp, + == SUBARRAY_LOW_BOUND) + range->low = value_as_long (evaluate_subexp (NULL_TYPE, exp, + pos, noside)); ++ + if ((range->f90_range_type & SUBARRAY_HIGH_BOUND) + == SUBARRAY_HIGH_BOUND) + range->high = value_as_long (evaluate_subexp (NULL_TYPE, exp, +@@ -496,6 +497,10 @@ value_f90_subarray (struct value *array, struct expression *exp, + /* Assign the default stride value '1'. */ + else + range->stride = 1; ++ ++ /* Check the provided stride value is illegal, aka '0'. */ ++ if (range->stride == 0) ++ error (_("Stride must not be 0")); + } + /* User input is an index. E.g.: "p arry(5)". */ + else +@@ -512,10 +517,8 @@ value_f90_subarray (struct value *array, struct expression *exp, + + } + +- /* Traverse the array from right to left and evaluate each corresponding +- user input. VALUE_SUBSCRIPT is called for every index, until a range +- expression is evaluated. After a range expression has been evaluated, +- every subsequent expression is also treated as a range. */ ++ /* Traverse the array from right to left and set the high and low bounds ++ for later use. */ + for (i = nargs - 1; i >= 0; i--) + { + struct subscript_store *index = &subscript_array[i]; +@@ -548,6 +551,48 @@ value_f90_subarray (struct value *array, struct expression *exp, + || range->high > TYPE_HIGH_BOUND (index_type)) + error (_("provided bound(s) outside array bound(s)")); + ++ /* For a negative stride the lower boundary must be larger than the ++ upper boundary. ++ For a positive stride the lower boundary must be smaller than the ++ upper boundary. */ ++ if ((range->stride < 0 && range->low < range->high) ++ || (range->stride > 0 && range->low > range->high)) ++ error (_("Wrong value provided for stride and boundaries")); ++ ++ } ++ break; ++ ++ case SUBSCRIPT_INDEX: ++ break; ++ ++ } ++ ++ array_type = TYPE_TARGET_TYPE (array_type); ++ } ++ ++ /* Reset ARRAY_TYPE before slicing.*/ ++ array_type = check_typedef (value_type (new_array)); ++ ++ /* Traverse the array from right to left and evaluate each corresponding ++ user input. VALUE_SUBSCRIPT is called for every index, until a range ++ expression is evaluated. After a range expression has been evaluated, ++ every subsequent expression is also treated as a range. */ ++ for (i = nargs - 1; i >= 0; i--) ++ { ++ struct subscript_store *index = &subscript_array[i]; ++ struct type *index_type = TYPE_INDEX_TYPE (array_type); ++ ++ switch (index->kind) ++ { ++ case SUBSCRIPT_RANGE: ++ { ++ ++ /* When we hit the first range specified by the user, we must ++ treat any subsequent user entry as a range. We simply ++ increment DIM_COUNT which tells us how many times we are ++ calling VALUE_SLICE_1. */ ++ struct subscript_range *range = &index->range; ++ + /* DIM_COUNT counts every user argument that is treated as a range. + This is necessary for expressions like 'print array(7, 8:9). + Here the first argument is a literal, but must be treated as a +@@ -555,10 +600,9 @@ value_f90_subarray (struct value *array, struct expression *exp, + dim_count++; + + new_array +- = value_slice_1 (new_array, +- longest_to_int (range->low), +- longest_to_int (range->high - range->low + 1), +- dim_count); ++ = value_slice_1 (new_array, range->low, ++ range->high - range->low + 1, ++ range->stride, dim_count); + } + break; + +@@ -572,27 +616,38 @@ value_f90_subarray (struct value *array, struct expression *exp, + to get the value offset right. */ + if (dim_count == 0) + new_array +- = value_subscripted_rvalue (new_array, index->number, ++ = value_subscripted_rvalue (new_array, index->number, + f77_get_lowerbound (value_type + (new_array))); + else + { +- /* Check for valid index input. */ ++ dim_count++; ++ ++ /* We might end up here, because we have to treat the provided ++ index like a range. But now VALUE_SUBSCRIPTED_RVALUE ++ cannot do the range checks for us. So we have to make sure ++ ourselves that the user provided index is inside the ++ array bounds. Throw an error if not. */ + if (index->number < TYPE_LOW_BOUND (index_type) +- || index->number > TYPE_HIGH_BOUND (index_type)) +- error (_("error no such vector element")); ++ && index->number < TYPE_HIGH_BOUND (index_type)) ++ error (_("provided bound(s) outside array bound(s)")); ++ ++ if (index->number > TYPE_LOW_BOUND (index_type) ++ && index->number > TYPE_HIGH_BOUND (index_type)) ++ error (_("provided bound(s) outside array bound(s)")); + +- dim_count++; + new_array = value_slice_1 (new_array, +- longest_to_int (index->number), +- 1, /* length is '1' element */ ++ index->number, ++ 1, /* COUNT is '1' element */ ++ 1, /* STRIDE set to '1' */ + dim_count); + } + + } + break; + } +- } ++ array_type = TYPE_TARGET_TYPE (array_type); ++ } + + /* With DIM_COUNT > 1 we currently have a one dimensional array, but expect + an array of arrays, depending on how many ranges have been provided by +@@ -617,7 +672,9 @@ value_f90_subarray (struct value *array, struct expression *exp, + the output array. So we traverse the SUBSCRIPT_ARRAY again, looking + for a range entry. When we find one, we use the range info to create + an additional range_type to set the correct bounds and dimensions for +- the output array. */ ++ the output array. In addition, we may have a stride value that is not ++ '1', forcing us to adjust the number of elements in a range, according ++ to the stride value. */ + for (i = 0; i < nargs; i++) + { + struct subscript_store *index = &subscript_array[i]; +@@ -625,12 +682,20 @@ value_f90_subarray (struct value *array, struct expression *exp, + if (index->kind == SUBSCRIPT_RANGE) + { + struct type *range_type, *interim_array_type; ++ int new_length; ++ ++ /* The length of a sub-dimension with all elements between the ++ bounds plus the start element itself. It may be modified by ++ a user provided stride value. */ ++ new_length = index->range.high - index->range.low; ++ ++ new_length /= index->range.stride; + + range_type + = create_static_range_type (NULL, +- temp_type, +- 1, +- index->range.high - index->range.low + 1); ++ temp_type, ++ index->range.low, ++ index->range.low + new_length); + + interim_array_type = create_array_type (NULL, + temp_type, +diff --git a/gdb/valops.c b/gdb/valops.c +index 09ea877..83c8462 100644 +--- a/gdb/valops.c ++++ b/gdb/valops.c +@@ -3759,10 +3759,13 @@ value_of_this_silent (const struct language_defn *lang) + struct value * + value_slice (struct value *array, int lowbound, int length) + { +- /* Pass unaltered arguments to VALUE_SLICE_1, plus a CALL_COUNT of '1' as we +- are only considering the highest dimension, or we are working on a one +- dimensional array. So we call VALUE_SLICE_1 exactly once. */ +- return value_slice_1 (array, lowbound, length, 1); ++ /* Pass unaltered arguments to VALUE_SLICE_1, plus a default stride ++ value of '1', which returns every element between LOWBOUND and ++ (LOWBOUND + LENGTH). We also provide a default CALL_COUNT of '1' ++ as we are only considering the highest dimension, or we are ++ working on a one dimensional array. So we call VALUE_SLICE_1 ++ exactly once. */ ++ return value_slice_1 (array, lowbound, length, 1, 1); + } + + /* CALL_COUNT is used to determine if we are calling the function once, e.g. +@@ -3776,7 +3779,8 @@ value_slice (struct value *array, int lowbound, int length) + ranges in the calling function. */ + + struct value * +-value_slice_1 (struct value *array, int lowbound, int length, int call_count) ++value_slice_1 (struct value *array, int lowbound, int length, ++ int stride_length, int call_count) + { + struct type *slice_range_type, *slice_type, *range_type; + struct type *array_type = check_typedef (value_type (array)); +@@ -3799,14 +3803,24 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + attributes of the underlying type. */ + if (call_count > 1) + { ++ ary_low_bound = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (elt_type)); ++ ary_high_bound = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (elt_type)); + elt_type = check_typedef (TYPE_TARGET_TYPE (elt_type)); + row_count = TYPE_LENGTH (array_type) + / TYPE_LENGTH (TYPE_TARGET_TYPE (array_type)); + } + +- elem_count = length; ++ /* With a stride of '1', the number of elements per result row is equal to ++ the LENGTH of the subarray. With non-default stride values, we skip ++ elements, but have to add the start element to the total number of ++ elements per row. */ ++ if (stride_length == 1) ++ elem_count = length; ++ else ++ elem_count = ((length - 1) / stride_length) + 1; ++ + elt_size = TYPE_LENGTH (elt_type); +- elt_offs = longest_to_int (lowbound - ary_low_bound); ++ elt_offs = lowbound - ary_low_bound; + elt_stride = TYPE_LENGTH (TYPE_INDEX_TYPE (array_type)); + + elt_offs *= elt_size; +@@ -3825,7 +3839,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + if (call_count == 1) + { + range_type = TYPE_INDEX_TYPE (array_type); +- slice_range_size = elem_count; ++ slice_range_size = ary_low_bound + elem_count - 1; + + /* Check if the array bounds are valid. */ + if (get_discrete_bounds (range_type, &ary_low_bound, &ary_high_bound) < 0) +@@ -3837,7 +3851,7 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + else + { + range_type = TYPE_INDEX_TYPE (TYPE_TARGET_TYPE (array_type)); +- slice_range_size = (ary_low_bound + row_count - 1) * (elem_count); ++ slice_range_size = ary_low_bound + (row_count * elem_count) - 1; + ary_low_bound = TYPE_LOW_BOUND (range_type); + } + +@@ -3849,8 +3863,9 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + { + struct type *element_type; + +- /* When CALL_COUNT equals 1 we can use the legacy code for subarrays. */ +- if (call_count == 1) ++ /* When both CALL_COUNT and STRIDE_LENGTH equal 1, we can use the legacy ++ code for subarrays. */ ++ if (call_count == 1 && stride_length == 1) + { + element_type = TYPE_TARGET_TYPE (array_type); + +@@ -3871,29 +3886,53 @@ value_slice_1 (struct value *array, int lowbound, int length, int call_count) + } + + } +- /* When CALL_COUNT is larger than 1 we are working on a range of ranges. +- So we copy the relevant elements into the new array we return. */ ++ /* With a CALL_COUNT or STRIDE_LENGTH are greater than 1 we are working ++ on a range of ranges. So we copy the relevant elements into the ++ new array we return. */ + else + { ++ int j, offs_store = elt_offs; + LONGEST dst_offset = 0; + LONGEST src_row_length = TYPE_LENGTH (TYPE_TARGET_TYPE (array_type)); + +- element_type = TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (array_type)); ++ if (call_count == 1) ++ { ++ /* When CALL_COUNT is equal to 1 we are working on the current range ++ and use these elements directly. */ ++ element_type = TYPE_TARGET_TYPE (array_type); ++ } ++ else ++ { ++ /* Working on an array of arrays, the type of the elements is the type ++ of the subarrays' type. */ ++ element_type = TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (array_type)); ++ } ++ + slice_type = create_array_type (NULL, element_type, slice_range_type); + +- TYPE_CODE (slice_type) = TYPE_CODE (TYPE_TARGET_TYPE (array_type)); ++ /* If we have a one dimensional array, we copy its TYPE_CODE. For a ++ multi dimensional array we copy the embedded type's TYPE_CODE. */ ++ if (call_count == 1) ++ TYPE_CODE (slice_type) = TYPE_CODE (array_type); ++ else ++ TYPE_CODE (slice_type) = TYPE_CODE (TYPE_TARGET_TYPE (array_type)); + + v = allocate_value (slice_type); +- for (i = 0; i < longest_to_int (row_count); i++) ++ ++ /* Iterate through the rows of the outer array and set the new offset ++ for each row. */ ++ for (i = 0; i < row_count; i++) + { +- /* Fetches the contents of ARRAY and copies them into V. */ +- value_contents_copy (v, +- dst_offset, +- array, +- elt_offs, +- elt_size * elem_count); +- elt_offs += src_row_length; +- dst_offset += elt_size * elem_count; ++ elt_offs = offs_store + i * src_row_length; ++ ++ /* Iterate through the elements in each row to copy only those. */ ++ for (j = 1; j <= elem_count; j++) ++ { ++ /* Fetches the contents of ARRAY and copies them into V. */ ++ value_contents_copy (v, dst_offset, array, elt_offs, elt_size); ++ elt_offs += elt_size * stride_length; ++ dst_offset += elt_size; ++ } + } + } + +diff --git a/gdb/value.h b/gdb/value.h +index 3400460..c18ef2e 100644 +--- a/gdb/value.h ++++ b/gdb/value.h +@@ -1056,7 +1056,7 @@ extern struct value *varying_to_slice (struct value *); + + extern struct value *value_slice (struct value *, int, int); + +-extern struct value *value_slice_1 (struct value *, int, int, int); ++extern struct value *value_slice_1 (struct value *, int, int, int, int); + + extern struct value *value_literal_complex (struct value *, struct value *, + struct type *); +-- +2.5.0 + diff --git a/SOURCES/gdb-fortran-stride-intel-6of6-nokfail.patch b/SOURCES/gdb-fortran-stride-intel-6of6-nokfail.patch new file mode 100644 index 0000000..5b61de1 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-6of6-nokfail.patch @@ -0,0 +1,36 @@ +--- gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/subrange.exp-orig 2016-01-08 22:45:44.956842553 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/subrange.exp 2016-01-08 23:26:05.078554629 +0100 +@@ -39,27 +39,16 @@ foreach var {a alloc ptr} { + set old_prefix $pf_prefix + lappend pf_prefix "$var:" + +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (2, 2:3)" { = \(22, 32\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (2:3, 3)" { = \(32, 33\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (1, 2:)" { = \(21, 31\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (2, :2)" { = \(12, 22\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (3, 2:2)" { = \(23\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "ptype $var (3, 2:2)" " = $int4 \\(2:2\\)" +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (4, :)" { = \(14, 24, 34\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (:, :)" { = \(\( *11, 12, 13, 14\) \( *21, 22, 23, 24\) \( *31, 32, 33, 34\) *\)} +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "ptype $var (:, :)" " = $int4 \\(4,3\\)" +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (:)" "Wrong number of subscripts" +- setup_kfail "*-*-*" "vlaregression/9999" + gdb_test "p $var (:, :, :)" "Wrong number of subscripts" + + set pf_prefix $old_prefix +@@ -68,5 +57,4 @@ foreach var {a alloc ptr} { + gdb_test_no_output {set $a=a} + delete_breakpoints + gdb_unload +-setup_kfail "*-*-*" "vlaregression/9999" + gdb_test {p $a (3, 2:2)} { = \(23\)} diff --git a/SOURCES/gdb-fortran-stride-intel-6of6.patch b/SOURCES/gdb-fortran-stride-intel-6of6.patch new file mode 100644 index 0000000..47faef2 --- /dev/null +++ b/SOURCES/gdb-fortran-stride-intel-6of6.patch @@ -0,0 +1,515 @@ +http://sourceware.org/ml/gdb-patches/2016-02/msg00847.html +Subject: [PATCH v2 6/6] fortran: test cases for subarray strides and slices + +From: Christoph Weinmann + +Add test cases for subarray creation with range, literal and +stride value permutations for one, two, and three dimensional +arrays. + +2013-12-04 Christoph Weinmann + +testsuite/gdb.fortran/ + * static-arrays.exp: New test. + * static-arrays.f90: New file. + + +Signed-off-by: Christoph Weinmann +--- + gdb/testsuite/gdb.fortran/static-arrays.exp | 421 ++++++++++++++++++++++++++++ + gdb/testsuite/gdb.fortran/static-arrays.f90 | 55 ++++ + 2 files changed, 476 insertions(+) + create mode 100644 gdb/testsuite/gdb.fortran/static-arrays.exp + create mode 100644 gdb/testsuite/gdb.fortran/static-arrays.f90 + +diff --git a/gdb/testsuite/gdb.fortran/static-arrays.exp b/gdb/testsuite/gdb.fortran/static-arrays.exp +new file mode 100644 +index 0000000..cc9ecc0 +--- /dev/null ++++ b/gdb/testsuite/gdb.fortran/static-arrays.exp +@@ -0,0 +1,421 @@ ++# Copyright 2015 Free Software Foundation, Inc. ++# ++# Contributed by Intel Corp. ++# ++# 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 static-arrays.f90 ++ ++if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } { ++ return -1 ++} ++ ++if ![runto MAIN__] then { ++ perror "couldn't run to breakpoint MAIN__" ++ continue ++} ++ ++gdb_breakpoint [gdb_get_line_number "BP1"] ++gdb_continue_to_breakpoint "BP1" ".*BP1.*" ++ ++# Tests subarrays of one dimensional arrays with subrange variations ++gdb_test "print ar1" "\\$\[0-9\]+ = \\(1, 2, 3, 4, 5, 6, 7, 8, 9\\)" \ ++ "print ar1." ++gdb_test "print ar1\(4:7\)" "\\$\[0-9\]+ = \\(4, 5, 6, 7\\)" \ ++ "print ar1\(4:7\)" ++gdb_test "print ar1\(8:\)" "\\$\[0-9\]+ = \\(8, 9\\).*" \ ++ "print ar1\(8:\)" ++gdb_test "print ar1\(:3\)" "\\$\[0-9\]+ = \\(1, 2, 3\\).*" \ ++ "print ar1\(:3\)" ++gdb_test "print ar1\(:\)" "\\$\[0-9\]+ = \\(1, 2, 3, 4, 5, 6, 7, 8, 9\\)" \ ++ "print ar1\(:\)" ++ ++# Check assignment ++gdb_test_no_output "set \$my_ary = ar1\(3:8\)" ++gdb_test "print \$my_ary" \ ++ "\\$\[0-9\]+ = \\(3, 4, 5, 6, 7, 8\\)" \ ++ "Assignment of subarray to variable" ++gdb_test_no_output "set ar1\(5\) = 42" ++ gdb_test "print ar1\(3:8\)" \ ++ "\\$\[0-9\]+ = \\(3, 4, 42, 6, 7, 8\\)" \ ++ "print ar1\(3:8\) after assignment" ++gdb_test "print \$my_ary" \ ++ "\\$\[0-9\]+ = \\(3, 4, 5, 6, 7, 8\\)" \ ++ "Assignment of subarray to variable after original array changed" ++ ++# Test for subarrays of one dimensional arrays with literals ++ gdb_test "print ar1\(3\)" "\\$\[0-9\]+ = 3" \ ++ "print ar1\(3\)" ++ ++# Tests for subranges of 2 dimensional arrays with subrange variations ++gdb_test "print ar2\(2:3, 3:4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 23, 33\\) \\( 24, 34\\) \\)" \ ++ "print ar2\(2:3, 3:4\)." ++gdb_test "print ar2\(8:9,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 88, 98\\) \\( 89, 99\\) \\)" \ ++ "print ar2\(8:9,8:\)" ++gdb_test "print ar2\(8:9,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 81, 91\\) \\( 82, 92\\) \\)" \ ++ "print ar2\(8:9,:2\)" ++ ++gdb_test "print ar2\(8:,8:9\)" \ ++ "\\$\[0-9\]+ = \\(\\( 88, 98\\) \\( 89, 99\\) \\)" \ ++ "print ar2\(8:,8:9\)" ++gdb_test "print ar2\(8:,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 88, 98\\) \\( 89, 99\\) \\)" \ ++ "print ar2\(8:,8:\)" ++gdb_test "print ar2\(8:,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 81, 91\\) \\( 82, 92\\) \\)" \ ++ "print ar2\(8:,:2\)" ++ ++gdb_test "print ar2\(:2,2:3\)" \ ++ "\\$\[0-9\]+ = \\(\\( 12, 22\\) \\( 13, 23\\) \\)" \ ++ "print ar2\(:2,2:3\)" ++gdb_test "print ar2\(:2,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 18, 28\\) \\( 19, 29\\) \\)" \ ++ "print ar2\(:2,8:\)" ++gdb_test "print ar2\(:2,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 11, 21\\) \\( 12, 22\\) \\)" \ ++ "print ar2\(:2,:2\)" ++ ++# Test subranges of 2 dimensional arrays with literals and subrange variations ++gdb_test "print ar2\(7, 3:6\)" \ ++ "\\$\[0-9\]+ = \\(73, 74, 75, 76\\)" \ ++ "print ar2\(7, 3:6\)" ++gdb_test "print ar2\(7,8:\)" \ ++ "\\$\[0-9\]+ = \\(78, 79\\)" \ ++ "print ar2\(7,8:\)" ++gdb_test "print ar2\(7,:2\)" \ ++ "\\$\[0-9\]+ = \\(71, 72\\)" \ ++ "print ar2\(7,:2\)" ++ ++gdb_test "print ar2\(7:8,4\)" \ ++ "\\$\[0-9\]+ = \\(74, 84\\)" \ ++ "print ar2(7:8,4\)" ++gdb_test "print ar2\(8:,4\)" \ ++ "\\$\[0-9\]+ = \\(84, 94\\)" \ ++ "print ar2\(8:,4\)" ++gdb_test "print ar2\(:2,4\)" \ ++ "\\$\[0-9\]+ = \\(14, 24\\)" \ ++ "print ar2\(:2,4\)" ++gdb_test "print ar2\(3,4\)" \ ++ "\\$\[0-9\]+ = 34" \ ++ "print ar2\(3,4\)" ++ ++# Test subarrays of 3 dimensional arrays with literals and subrange variations ++gdb_test "print ar3\(2:4,3:4,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 237, 337, 437\\) \\( 247, 347, 447\\)\ ++ \\) \\( \\( 238, 338, 438\\) \\( 248, 348, 448\\) \\) \\)" \ ++ "print ar3\(2:4,3:4,7:8\)" ++gdb_test "print ar3\(2:3,4:5,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 248, 348\\) \\( 258, 358\\) \\) \\(\ ++ \\( 249, 349\\) \\( 259, 359\\) \\) \\)" \ ++ "print ar3\(2:3,4:5,8:\)" ++gdb_test "print ar3\(2:3,4:5,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 241, 341\\) \\( 251, 351\\) \\) \\(\ ++ \\( 242, 342\\) \\( 252, 352\\) \\) \\)" \ ++ "print ar3\(2:3,4:5,:2\)" ++ ++gdb_test "print ar3\(2:3,8:,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 287, 387\\) \\( 297, 397\\) \\) \\(\ ++ \\( 288, 388\\) \\( 298, 398\\) \\) \\)" \ ++ "print ar3\(2:3,8:,7:8\)" ++gdb_test "print ar3\(2:3,8:,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 288, 388\\) \\( 298, 398\\) \\) \\(\ ++ \\( 289, 389\\) \\( 299, 399\\) \\) \\)" \ ++ "print ar3\(2:3,8:,8:\)" ++gdb_test "print ar3\(2:3,8:,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 281, 381\\) \\( 291, 391\\) \\) \\(\ ++ \\( 282, 382\\) \\( 292, 392\\) \\) \\)" \ ++ "print ar3\(2:3,8:,:2\)" ++ ++gdb_test "print ar3\(2:3,:2,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 217, 317\\) \\( 227, 327\\) \\) \\(\ ++ \\( 218, 318\\) \\( 228, 328\\) \\) \\)" \ ++ "print ar3\(2:3,:2,7:8\)" ++gdb_test "print ar3\(2:3,:2,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 218, 318\\) \\( 228, 328\\) \\) \\(\ ++ \\( 219, 319\\) \\( 229, 329\\) \\) \\)" \ ++ "print ar3\(2:3,:2,8:\)" ++gdb_test "print ar3\(2:3,:2,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 211, 311\\) \\( 221, 321\\) \\) \\(\ ++ \\( 212, 312\\) \\( 222, 322\\) \\) \\)" \ ++ "print ar3\(2:3,:2,:2\)" ++ ++gdb_test "print ar3\(8:,3:4,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 837, 937\\) \\( 847, 947\\) \\) \\(\ ++ \\( 838, 938\\) \\( 848, 948\\) \\) \\)" \ ++ "print ar3\(8:,3:4,7:8\)" ++gdb_test "print ar3\(8:,4:5,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 848, 948\\) \\( 858, 958\\) \\) \\(\ ++ \\( 849, 949\\) \\( 859, 959\\) \\) \\)" \ ++ "print ar3\(8:,4:5,8:\)" ++gdb_test "print ar3\(8:,4:5,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 841, 941\\) \\( 851, 951\\) \\) \\(\ ++ \\( 842, 942\\) \\( 852, 952\\) \\) \\)" \ ++ "print ar3\(8:,4:5,:2\)" ++ ++gdb_test "print ar3\(8:,8:,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 887, 987\\) \\( 897, 997\\) \\) \\(\ ++ \\( 888, 988\\) \\( 898, 998\\) \\) \\)" \ ++ "print ar3\(8:,8:,7:8\)" ++gdb_test "print ar3\(8:,8:,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 888, 988\\) \\( 898, 998\\) \\) \\(\ ++ \\( 889, 989\\) \\( 899, 999\\) \\) \\)" \ ++ "print ar3\(8:,8:,8:\)" ++gdb_test "print ar3\(8:,8:,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 881, 981\\) \\( 891, 991\\) \\) \\(\ ++ \\( 882, 982\\) \\( 892, 992\\) \\) \\)" \ ++ "print ar3\(8:,8:,:2\)" ++ ++gdb_test "print ar3\(8:,:2,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 817, 917\\) \\( 827, 927\\) \\) \\(\ ++ \\( 818, 918\\) \\( 828, 928\\) \\) \\)" \ ++ "print ar3\(8:,:2,7:8\)" ++gdb_test "print ar3\(8:,:2,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 818, 918\\) \\( 828, 928\\) \\) \\(\ ++ \\( 819, 919\\) \\( 829, 929\\) \\) \\)" \ ++ "print ar3\(8:,:2,8:\)" ++gdb_test "print ar3\(8:,:2,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 811, 911\\) \\( 821, 921\\) \\) \\(\ ++ \\( 812, 912\\) \\( 822, 922\\) \\) \\)" \ ++ "print ar3\(8:,:2,:2\)" ++ ++ ++gdb_test "print ar3\(:2,3:4,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 137, 237\\) \\( 147, 247\\) \\) \\(\ ++ \\( 138, 238\\) \\( 148, 248\\) \\) \\)" \ ++ "print ar3 \(:2,3:4,7:8\)." ++gdb_test "print ar3\(:2,3:4,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 138, 238\\) \\( 148, 248\\) \\) \\(\ ++ \\( 139, 239\\) \\( 149, 249\\) \\) \\)" \ ++ "print ar3\(:2,3:4,8:\)" ++gdb_test "print ar3\(:2,3:4,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 131, 231\\) \\( 141, 241\\) \\) \\(\ ++ \\( 132, 232\\) \\( 142, 242\\) \\) \\)" \ ++ "print ar3\(:2,3:4,:2\)" ++ ++gdb_test "print ar3\(:2,8:,7:8\)" "\\$\[0-9\]+ = \\(\\( \\( 187, 287\\) \\(\ ++ 197, 297\\) \\) \\( \\( 188, 288\\) \\( 198, 298\\) \\) \\)" \ ++ "print ar3\(:2,8:,7:8\)" ++gdb_test "print ar3\(:2,8:,8:\)" "\\$\[0-9\]+ = \\(\\( \\( 188, 288\\) \\( 198,\ ++ 298\\) \\) \\( \\( 189, 289\\) \\( 199, 299\\) \\) \\)" \ ++ "print ar3\(:2,8:,8:\)" ++gdb_test "print ar3\(:2,8:,:2\)" "\\$\[0-9\]+ = \\(\\( \\( 181, 281\\) \\( 191,\ ++ 291\\) \\) \\( \\( 182, 282\\) \\( 192, 292\\) \\) \\)" \ ++ "print ar3\(:2,8:,:2\)" ++ ++gdb_test "print ar3\(:2,:2,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 117, 217\\) \\( 127, 227\\) \\) \\(\ ++ \\( 118, 218\\) \\( 128, 228\\) \\) \\)" \ ++ "print ar3\(:2,:2,7:8\)" ++gdb_test "print ar3\(:2,:2,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 118, 218\\) \\( 128, 228\\) \\) \\(\ ++ \\( 119, 219\\) \\( 129, 229\\) \\) \\)" \ ++ "print ar3\(:2,:2,8:\)" ++gdb_test "print ar3\(:2,:2,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 111, 211\\) \\( 121, 221\\) \\) \\(\ ++ \\( 112, 212\\) \\( 122, 222\\) \\) \\)" \ ++ "print ar3\(:2,:2,:2\)" ++ ++#Tests for subarrays of 3 dimensional arrays with literals and subranges ++gdb_test "print ar3\(3,3:4,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 337, 347\\) \\( 338, 348\\) \\)" \ ++ "print ar3\(3,3:4,7:8\)" ++gdb_test "print ar3\(3,4:5,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 348, 358\\) \\( 349, 359\\) \\)" \ ++ "print ar3\(3,4:5,8:\)" ++gdb_test "print ar3\(3,4:5,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 341, 351\\) \\( 342, 352\\) \\)" \ ++ "print ar3\(3,4:5,:2\)" ++gdb_test "print ar3\(3,4:5,3\)" \ ++ "\\$\[0-9\]+ = \\(343, 353\\)" \ ++ "print ar3\(3,4:5,3\)" ++ ++gdb_test "print ar3\(2,8:,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 287, 297\\) \\( 288, 298\\) \\)" \ ++ "print ar3\(2,8:,7:8\)" ++gdb_test "print ar3\(2,8:,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 288, 298\\) \\( 289, 299\\) \\)" \ ++ "print ar3\(2,8:,8:\)" ++gdb_test "print ar3\(2,8:,:2\)"\ ++ "\\$\[0-9\]+ = \\(\\( 281, 291\\) \\( 282, 292\\) \\)" \ ++ "print ar3\(2,8:,:2\)" ++gdb_test "print ar3\(2,8:,3\)" \ ++ "\\$\[0-9\]+ = \\(283, 293\\)" \ ++ "print ar3\(2,8:,3\)" ++ ++gdb_test "print ar3\(2,:2,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 217, 227\\) \\( 218, 228\\) \\)" \ ++ "print ar3\(2,:2,7:8\)" ++gdb_test "print ar3\(2,:2,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 218, 228\\) \\( 219, 229\\) \\)" \ ++ "print ar3\(2,:2,8:\)" ++gdb_test "print ar3\(2,:2,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 211, 221\\) \\( 212, 222\\) \\)" \ ++ "print ar3\(2,:2,:2\)" ++gdb_test "print ar3\(2,:2,3\)" \ ++ "\\$\[0-9\]+ = \\(213, 223\\)" \ ++ "print ar3\(2,:2,3\)" ++ ++gdb_test "print ar3\(3,4,7:8\)" \ ++ "\\$\[0-9\]+ = \\(347, 348\\)" \ ++ "print ar3\(3,4,7:8\)" ++gdb_test "print ar3\(3,4,8:\)" \ ++ "\\$\[0-9\]+ = \\(348, 349\\)" \ ++i "print ar3\(3,4,8:\)" ++gdb_test "print ar3\(3,4,:2\)" \ ++ "\\$\[0-9\]+ = \\(341, 342\\)" \ ++ "print ar3\(3,4,:2\)" ++gdb_test "print ar3\(5,6,7\)" \ ++ "\\$\[0-9\]+ = 567" \ ++ "print ar3\(5,6,7\)" ++ ++gdb_test "print ar3\(3:4,6,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 367, 467\\) \\( 368, 468\\) \\)" \ ++ "print ar3\(3:4,6,7:8\)" ++gdb_test "print ar3\(3:4,6,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 368, 468\\) \\( 369, 469\\) \\)" \ ++ "print ar3\(3:4,6,8:\)" ++gdb_test "print ar3\(3:4,6,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 361, 461\\) \\( 362, 462\\) \\)" \ ++ "print ar3\(3:4,6,:2\)" ++gdb_test "print ar3\(3:4,6,5\)" \ ++ "\\$\[0-9\]+ = \\(365, 465\\)" \ ++ "print ar3\(3:4,6,5\)" ++ ++gdb_test "print ar3\(8:,6,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 867, 967\\) \\( 868, 968\\) \\)" \ ++ "print ar3\(8:,6,7:8\)" ++gdb_test "print ar3\(8:,6,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 868, 968\\) \\( 869, 969\\) \\)" \ ++ "print ar3\(8:,6,8:\)" ++gdb_test "print ar3\(8:,6,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 861, 961\\) \\( 862, 962\\) \\)" \ ++ "print ar3\(8:,6,:2\)" ++gdb_test "print ar3\(8:,6,5\)" \ ++ "\\$\[0-9\]+ = \\(865, 965\\)" \ ++ "print ar3\(8:,6,5\)" ++ ++gdb_test "print ar3\(:2,6,7:8\)" \ ++ "\\$\[0-9\]+ = \\(\\( 167, 267\\) \\( 168, 268\\) \\)" \ ++ "print ar3\(:2,6,7:8\)" ++gdb_test "print ar3\(:2,6,8:\)" \ ++ "\\$\[0-9\]+ = \\(\\( 168, 268\\) \\( 169, 269\\) \\)" \ ++ "print ar3\(:2,6,8:\)" ++gdb_test "print ar3\(:2,6,:2\)" \ ++ "\\$\[0-9\]+ = \\(\\( 161, 261\\) \\( 162, 262\\) \\)" \ ++ "print ar3\(:2,6,:2\)" ++gdb_test "print ar3\(:2,6,5\)" \ ++ "\\$\[0-9\]+ = \\(165, 265\\)" \ ++ "print ar3\(:2,6,5\)" ++ ++gdb_test "print ar3\(3:4,5:6,4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 354, 454\\) \\( 364, 464\\) \\)" \ ++ "print ar2\(3:4,5:6,4\)" ++gdb_test "print ar3\(8:,5:6,4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 854, 954\\) \\( 864, 964\\) \\)" \ ++ "print ar2\(8:,5:6,4\)" ++gdb_test "print ar3\(:2,5:6,4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 154, 254\\) \\( 164, 264\\) \\)" \ ++ "print ar2\(:2,5:6,4\)" ++ ++# Stride > 1 ++gdb_test "print ar1\(2:6:2\)" \ ++ "\\$\[0-9\]+ = \\(2, 4, 6\\)" \ ++ "print ar1\(2:6:2\)" ++gdb_test "print ar2\(2:6:2,3:4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 23, 43, 63\\) \\( 24, 44, 64\\) \\)" \ ++ "print ar2\(2:6:2,3:4\)" ++gdb_test "print ar2\(2:6:2,3\)" \ ++ "\\$\[0-9\]+ = \\(23, 43, 63\\)" \ ++ "print ar2\(2:6:2,3\)" ++gdb_test "print ar3\(2:6:2,3:5:2,4:7:3\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 234, 434, 634\\) \\( 254, 454, 654\\)\ ++ \\) \\( \\( 237, 437, 637\\) \\( 257, 457, 657\\) \\) \\)" \ ++ "print ar3\(2:6:2,3:5:2,4:7:3\)" ++gdb_test "print ar3\(2:6:2,5,4:7:3\)" \ ++ "\\$\[0-9\]+ = \\(\\( 254, 454, 654\\) \\( 257, 457, 657\\)\ ++ \\)" \ ++ "print ar3\(2:6:2,5,4:7:3\)" ++ ++# Stride < 0 ++gdb_test "print ar1\(8:2:-2\)" \ ++ "\\$\[0-9\]+ = \\(8, 6, 4, 2\\)" \ ++ "print ar1\(8:2:-2\)" ++gdb_test "print ar2\(8:2:-2,3:4\)" \ ++ "\\$\[0-9\]+ = \\(\\( 83, 63, 43, 23\\) \\( 84, 64, 44, 24\\)\ ++ \\)" \ ++ "print ar2\(8:2:-2,3:4\)" ++gdb_test "print ar2\(2:6:2,3\)" \ ++ "\\$\[0-9\]+ = \\(23, 43, 63\\)" \ ++ "print ar2\(2:6:2,3\)" ++gdb_test "print ar3\(2:3,7:3:-4,4:7:3\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 274, 374\\) \\( 234, 334\\) \\) \\(\ ++ \\( 277, 377\\) \\( 237, 337\\) \\) \\)" \ ++ "print ar3\(2:3,7:3:-4,4:7:3\)" ++gdb_test "print ar3\(2:6:2,5,7:4:-3\)" \ ++ "\\$\[0-9\]+ = \\(\\( 257, 457, 657\\) \\( 254, 454, 654\\)\ ++ \\)" \ ++ "print ar3\(2:6:2,5,7:4:-3\)" ++ ++# Tests with negative and mixed indices ++gdb_test "p ar4\(2:4, -2:1, -15:-14\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 261, 361, 461\\) \\( 271, 371, 471\\)\ ++ \\( 281, 381, 481\\) \\( 291, 391, 491\\) \\) \\( \\( 262,\ ++ 362, 462\\) \\( 272, 372, 472\\) \\( 282, 382, 482\\) \\( 292,\ ++ 392, 492\\) \\) \\)" \ ++ "print ar4(2:4, -2:1, -15:-14)" ++ ++gdb_test "p ar4\(7,-6:2:3,-7\)" \ ++ "\\$\[0-9\]+ = \\(729, 759, 789\\)" \ ++ "print ar4(7,-6:2:3,-7)" ++ ++gdb_test "p ar4\(9:2:-2, -6:2:3, -6:-15:-3\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 930, 730, 530, 330\\) \\( 960, 760,\ ++ 560, 360\\) \\( 990, 790, 590, 390\\) \\) \\( \\( 927, 727,\ ++ 527, 327\\) \\( 957, 757, 557, 357\\) \\( 987, 787, 587,\ ++ 387\\) \\) \\( \\( 924, 724, 524, 324\\) \\( 954, 754, 554,\ ++ 354\\) \\( 984, 784, 584, 384\\) \\) \\( \\( 921, 721, 521,\ ++ 321\\) \\( 951, 751, 551, 351\\) \\( 981, 781, 581, 381\\) \\)\ ++ \\)" \ ++ "print ar4(9:2:-2, -6:2:3, -6:-15:-3)" ++ ++gdb_test "p ar4\(:,:,:\)" \ ++ "\\$\[0-9\]+ = \\(\\( \\( 111, 211, 311, 411, 511, 611, 711,\ ++ 811, .*" \ ++ "print ar4(:,:,:)" ++ ++# Provoke error messages for bad user input ++gdb_test "print ar1\(0:4\)" \ ++ "provided bound\\(s\\) outside array bound\\(s\\)" \ ++ "print ar1\(0:4\)" ++gdb_test "print ar1\(8:12\)" \ ++ "provided bound\\(s\\) outside array bound\\(s\\)" \ ++ "print ar1\(8:12\)" ++gdb_test "print ar1\(8:2:\)" \ ++ "A syntax error in expression, near `\\)'." \ ++ "print ar1\(8:2:\)" ++gdb_test "print ar1\(8:2:2\)" \ ++ "Wrong value provided for stride and boundaries" \ ++ "print ar1\(8:2:2\)" ++gdb_test "print ar1\(2:8:-2\)" \ ++ "Wrong value provided for stride and boundaries" \ ++ "print ar1\(2:8:-2\)" ++gdb_test "print ar1\(2:7:0\)" \ ++ "Stride must not be 0" \ ++ "print ar1\(2:7:0\)" ++gdb_test "print ar1\(3:7\) = 42" \ ++ "Invalid cast." \ ++ "Assignment of value to subarray" +diff --git a/gdb/testsuite/gdb.fortran/static-arrays.f90 b/gdb/testsuite/gdb.fortran/static-arrays.f90 +new file mode 100644 +index 0000000..f22fcbe +--- /dev/null ++++ b/gdb/testsuite/gdb.fortran/static-arrays.f90 +@@ -0,0 +1,55 @@ ++! Copyright 2015 Free Software Foundation, Inc. ++! ++! Contributed by Intel Corp. ++! ++! 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 . ++ ++subroutine sub ++ integer, dimension(9) :: ar1 ++ integer, dimension(9,9) :: ar2 ++ integer, dimension(9,9,9) :: ar3 ++ integer, dimension(10,-7:3, -15:-5) :: ar4 ++ integer :: i,j,k ++ ++ ar1 = 1 ++ ar2 = 1 ++ ar3 = 1 ++ ar4 = 4 ++ ++ ! Resulting array ar3 looks like ((( 111, 112, 113, 114,...))) ++ do i = 1, 9, 1 ++ ar1(i) = i ++ do j = 1, 9, 1 ++ ar2(i,j) = i*10 + j ++ do k = 1, 9, 1 ++ ar3(i,j,k) = i*100 + j*10 + k ++ end do ++ end do ++ end do ++ ++ do i = 1, 10, 1 ++ do j = -7, 3, 1 ++ do k = -15, -5, 1 ++ ar4(i,j,k) = i*100 + (j+8)*10 + (k+16) ++ end do ++ end do ++ end do ++ ++ ar1(1) = 11 !BP1 ++ return ++end ++ ++program testprog ++ call sub ++end +-- +2.5.0 + diff --git a/SOURCES/gdb-lineno-makeup-test.patch b/SOURCES/gdb-lineno-makeup-test.patch index 073662a..bd9c55e 100644 --- a/SOURCES/gdb-lineno-makeup-test.patch +++ b/SOURCES/gdb-lineno-makeup-test.patch @@ -6,8 +6,10 @@ http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html [rfc] Do not make up line information http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c 2016-02-15 23:29:16.595161971 +0100 @@ -0,0 +1,21 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -30,8 +32,10 @@ http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html +func (void) +{ +} ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup.c +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c 2016-02-15 23:29:23.873213646 +0100 @@ -0,0 +1,35 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -60,7 +64,7 @@ http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html + (s390_analyze_prologue) would skip the whole body till reaching `main'. */ + +extern void func (void); -+asm ("func: .incbin \"gdb.base/lineno-makeup-func.bin\""); ++asm ("func: .incbin \"" BINFILENAME "\""); + +int +main (void) @@ -68,8 +72,10 @@ http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html + func (); + return 0; +} ---- /dev/null -+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp 2016-02-15 23:29:23.873213646 +0100 @@ -0,0 +1,78 @@ +# Copyright 2009 Free Software Foundation, Inc. + @@ -89,9 +95,9 @@ http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html +set testfile "lineno-makeup" +set srcfuncfile ${testfile}-func.c +set srcfile ${testfile}.c -+set objfuncfile ${objdir}/${subdir}/${testfile}-func.o -+set binfuncfile ${objdir}/${subdir}/${testfile}-func.bin -+set binfile ${objdir}/${subdir}/${testfile} ++set objfuncfile [standard_output_file ${testfile}-func.o] ++set binfuncfile [standard_output_file ${testfile}-func.bin] ++set binfile [standard_output_file ${testfile}] + +if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." @@ -105,7 +111,7 @@ http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html +set binfuncfilesize [file size $binfuncfile] +verbose -log "file size $binfuncfile = $binfuncfilesize" + -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=-DBINFILENAME=\"$binfuncfile\"]] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + diff --git a/SOURCES/gdb-opcodes-clflushopt-test.patch b/SOURCES/gdb-opcodes-clflushopt-test.patch new file mode 100644 index 0000000..63c3031 --- /dev/null +++ b/SOURCES/gdb-opcodes-clflushopt-test.patch @@ -0,0 +1,50 @@ +--- /dev/null 2016-01-16 21:50:55.732812229 +0100 ++++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.exp 2016-01-16 22:49:19.950683918 +0100 +@@ -0,0 +1,25 @@ ++# Copyright 2016 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++if { ![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"] } then { ++ verbose "Skipping amd64 clflushopt test." ++ return ++} ++ ++if [prepare_for_testing amd64-clflushopt.exp amd64-clflushopt amd64-clflushopt.S [list debug "additional_flags=-nostdlib"]] { ++ return -1 ++} ++ ++gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt" +--- /dev/null 2016-01-16 21:50:55.732812229 +0100 ++++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.S 2016-01-16 22:49:26.398725209 +0100 +@@ -0,0 +1,19 @@ ++/* Copyright 2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ This file is part of the gdb testsuite. */ ++ ++_start: .globl _start ++ clflushopt (%edi) diff --git a/SOURCES/gdb-readline62-ask-more-rh.patch b/SOURCES/gdb-readline62-ask-more-rh.patch index 6f110be..ae68946 100644 --- a/SOURCES/gdb-readline62-ask-more-rh.patch +++ b/SOURCES/gdb-readline62-ask-more-rh.patch @@ -1,14 +1,17 @@ ---- gdb-7.4.50.20120103-orig/gdb/event-top.c 2012-01-11 15:14:01.426206439 +0100 -+++ gdb-7.4.50.20120103/gdb/event-top.c 2012-01-11 15:18:29.766577551 +0100 -@@ -982,6 +982,11 @@ set_async_editing_command (char *args, i +diff -dup -rup gdb-7.10.50.20160106-orig/gdb/event-top.c gdb-7.10.50.20160106/gdb/event-top.c +--- gdb-7.10.50.20160106-orig/gdb/event-top.c 2016-01-09 14:51:02.324243506 +0100 ++++ gdb-7.10.50.20160106/gdb/event-top.c 2016-01-09 14:51:33.029434121 +0100 +@@ -1033,6 +1033,13 @@ set_async_editing_command (char *args, i void gdb_setup_readline (void) { ++#ifdef NEED_RL_STATE_FEDORA_GDB + /* 6.2 regression: no longed asks for --more-- + gdb.base/readline-ask.exp + https://bugzilla.redhat.com/show_bug.cgi?id=701131 */ + RL_SETSTATE (RL_STATE_FEDORA_GDB); + ++#endif /* This function is a noop for the sync case. The assumption is that the sync setup is ALL done in gdb_init, and we would only mess it up here. The sync stuff should really go away over diff --git a/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch b/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch new file mode 100644 index 0000000..446ac6b --- /dev/null +++ b/SOURCES/gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch @@ -0,0 +1,86 @@ +Index: gdb-7.6.1/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.1/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp 2016-03-10 22:31:31.152094080 +0100 +@@ -0,0 +1,43 @@ ++# Copyright (C) 2016 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++if { [prepare_for_testing rhbz1261564-aarch64-watchpoint.exp "rhbz1261564-aarch64-watchpoint"] } { ++ return -1 ++} ++ ++if { ! [ runto main ] } then { return 0 } ++ ++gdb_test "rwatch aligned.var4" "Hardware read watchpoint \[0-9\]+: aligned.var4" ++ ++proc checkvar { address } { ++ global gdb_prompt ++ ++ set test "p &aligned.var$address" ++ gdb_test_multiple $test $test { ++ -re " = \\(int \\*\\) 0x\[0-9a-f\]+$address \r\n$gdb_prompt $" { ++ pass $test ++ } ++ -re "\r\n$gdb_prompt $" { ++ untested "$test (unexpected ELF layout)" ++ return 0 ++ } ++ } ++ return 1 ++} ++if ![checkvar "0"] { return } ++if ![checkvar "4"] { return } ++if ![checkvar "8"] { return } ++ ++gdb_continue_to_end +Index: gdb-7.6.1/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.6.1/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c 2016-03-10 22:31:31.152094080 +0100 +@@ -0,0 +1,33 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 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 . */ ++ ++__attribute__((aligned(16))) struct ++{ ++ int var0, var4, var8; ++} aligned; ++ ++int ++main (void) ++{ ++ aligned.var0 = 1; ++ aligned.var4 = 2; ++ aligned.var8 = 3; ++ ++ aligned.var4 = aligned.var0; ++ ++ return 0; ++} diff --git a/SOURCES/gdb-rhbz1318049-gdb-p-container-internal-error.patch b/SOURCES/gdb-rhbz1318049-gdb-p-container-internal-error.patch new file mode 100644 index 0000000..8126be8 --- /dev/null +++ b/SOURCES/gdb-rhbz1318049-gdb-p-container-internal-error.patch @@ -0,0 +1,230 @@ +http://post-office.corp.redhat.com/archives/debug-list/2016-April/msg00003.html + +>From cb8bfeaa21a2df484d3c4c35cc6ea1c4b32cefc8 Mon Sep 17 00:00:00 2001 +From: Pedro Alves +Date: Wed, 6 Apr 2016 15:07:49 +0100 +Subject: [PATCH] Fix PR gdb/19828: gdb -p : internal + error + +When GDB attaches to a process, it looks at the /proc/PID/task/ dir +for all clone threads of that process, and attaches to each of them. + +Usually, if there is more than one clone thread, it means the program +is multi threaded and linked with pthreads. Thus when GDB soon after +attaching finds and loads a libthread_db matching the process, it'll +add a thread to the thread list for each of the initially found +lower-level LWPs. + +If, however, GDB fails to find/load a matching libthread_db, nothing +is adding the LWPs to the thread list. And because of that, "detach" +hits an internal error: + + (gdb) PASS: gdb.threads/clone-attach-detach.exp: fg attach 1: attach + info threads + Id Target Id Frame + * 1 LWP 6891 "clone-attach-de" 0x00007f87e5fd0790 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84 + (gdb) FAIL: gdb.threads/clone-attach-detach.exp: fg attach 1: info threads shows two LWPs + detach + .../src/gdb/thread.c:1010: internal-error: is_executing: Assertion `tp' failed. + A problem internal to GDB has been detected, + further debugging may prove unreliable. + Quit this debugging session? (y or n) + FAIL: gdb.threads/clone-attach-detach.exp: fg attach 1: detach (GDB internal error) + +>From here: + + ... + #8 0x00000000007ba7cc in internal_error (file=0x98ea68 ".../src/gdb/thread.c", line=1010, fmt=0x98ea30 "%s: Assertion `%s' failed.") + at .../src/gdb/common/errors.c:55 + #9 0x000000000064bb83 in is_executing (ptid=...) at .../src/gdb/thread.c:1010 + #10 0x00000000004c23bb in get_pending_status (lp=0x12c5cc0, status=0x7fffffffdc0c) at .../src/gdb/linux-nat.c:1235 + #11 0x00000000004c2738 in detach_callback (lp=0x12c5cc0, data=0x0) at .../src/gdb/linux-nat.c:1317 + #12 0x00000000004c1a2a in iterate_over_lwps (filter=..., callback=0x4c2599 , data=0x0) at .../src/gdb/linux-nat.c:899 + #13 0x00000000004c295c in linux_nat_detach (ops=0xe7bd30, args=0x0, from_tty=1) at .../src/gdb/linux-nat.c:1358 + #14 0x000000000068284d in delegate_detach (self=0xe7bd30, arg1=0x0, arg2=1) at .../src/gdb/target-delegates.c:34 + #15 0x0000000000694141 in target_detach (args=0x0, from_tty=1) at .../src/gdb/target.c:2241 + #16 0x0000000000630582 in detach_command (args=0x0, from_tty=1) at .../src/gdb/infcmd.c:2975 + ... + +Tested on x86-64 Fedora 23. Also confirmed the test passes against +gdbserver with with "maint set target-non-stop". + +gdb/ChangeLog: +yyyy-mm-dd Pedro Alves + + * linux-nat.c (attach_proc_task_lwp_callback): Add the thread to + GDB's thread list. + +testsuite/ChangeLog: +yyyy-mm-dd Pedro Alves + + * gdb.threads/clone-attach-detach.c: New file. + * gdb.threads/clone-attach-detach.exp: New file. +--- + gdb/linux-nat.c | 5 ++ + gdb/testsuite/gdb.threads/clone-attach-detach.c | 66 +++++++++++++++++++++++ + gdb/testsuite/gdb.threads/clone-attach-detach.exp | 63 ++++++++++++++++++++++ + 3 files changed, 134 insertions(+) + create mode 100644 gdb/testsuite/gdb.threads/clone-attach-detach.c + create mode 100644 gdb/testsuite/gdb.threads/clone-attach-detach.exp + +diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c +index 0829bcb..2025c19 100644 +--- a/gdb/linux-nat.c ++++ b/gdb/linux-nat.c +@@ -1088,6 +1088,11 @@ attach_proc_task_lwp_callback (ptid_t ptid) + /* We need to wait for a stop before being able to make the + next ptrace call on this LWP. */ + lp->must_set_ptrace_flags = 1; ++ ++ /* Also add the LWP to gdb's thread list, in case a ++ matching libthread_db is not found (or the process uses ++ raw clone). */ ++ add_thread (lp->ptid); + } + + return 1; +diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.c b/gdb/testsuite/gdb.threads/clone-attach-detach.c +new file mode 100644 +index 0000000..daa8f1f +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/clone-attach-detach.c +@@ -0,0 +1,66 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++*/ ++ ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define STACK_SIZE 0x1000 ++ ++int clone_pid; ++ ++static int ++clone_fn (void *unused) ++{ ++ /* Wait for alarm. */ ++ while (1) ++ sleep (1); ++ return 0; ++} ++ ++int ++main (int argc, char **argv) ++{ ++ unsigned char *stack; ++ int res; ++ ++ alarm (300); ++ ++ stack = malloc (STACK_SIZE); ++ assert (stack != NULL); ++ ++#define CLONE_FLAGS (CLONE_THREAD | CLONE_SIGHAND | CLONE_VM) ++ ++#ifdef __ia64__ ++ clone_pid = __clone2 (clone_fn, stack, STACK_SIZE, CLONE_FLAGS, NULL); ++#else ++ clone_pid = clone (clone_fn, stack + STACK_SIZE, CLONE_FLAGS, NULL); ++#endif ++ ++ assert (clone_pid > 0); ++ ++ /* Wait for alarm. */ ++ while (1) ++ sleep (1); ++ ++ return 0; ++} +diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.exp b/gdb/testsuite/gdb.threads/clone-attach-detach.exp +new file mode 100644 +index 0000000..0652108 +--- /dev/null ++++ b/gdb/testsuite/gdb.threads/clone-attach-detach.exp +@@ -0,0 +1,63 @@ ++# This testcase is part of GDB, the GNU debugger. ++ ++# Copyright 2016 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 . ++ ++# Test attach / detach from a process that uses raw clone. We use raw ++# clone as proxy for when libthread_db is not available. ++ ++# This only works on targets with the Linux kernel. ++if ![istarget *-*-linux*] { ++ return ++} ++ ++if {![can_spawn_for_attach]} { ++ return 0 ++} ++ ++standard_testfile ++ ++if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] { ++ return -1 ++} ++ ++clean_restart ${binfile} ++ ++set test_spawn_id [spawn_wait_for_attach $binfile] ++set testpid [spawn_id_get_pid $test_spawn_id] ++ ++# Native/gdbserver. ++set thread_re "(LWP $decimal|Thread )" ++ ++# Try attach / detach a few times, in case GDB ends up with stale ++# state after detaching. ++ ++set attempts 3 ++for {set attempt 1} {$attempt <= $attempts} {incr attempt} { ++ with_test_prefix "fg attach $attempt" { ++ ++ gdb_test "attach $testpid" \ ++ "Attaching to program.*process $testpid.*" \ ++ "attach" ++ ++ gdb_test "info threads" \ ++ "1.*${thread_re}.*\r\n.*2.*${thread_re}.*" \ ++ "info threads shows two LWPs" ++ ++ gdb_test "detach" "Detaching from .*, process $testpid" ++ } ++} ++ ++kill_wait_spawned_process $test_spawn_id +-- +2.5.5 + diff --git a/SOURCES/gdb-rhbz795424-bitpos-20of25.patch b/SOURCES/gdb-rhbz795424-bitpos-20of25.patch index dbc8579..6037e0e 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-20of25.patch +++ b/SOURCES/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.9.90.20150709/gdb/ada-lang.c +Index: gdb-7.10.50.20151027/gdb/ada-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ada-lang.c 2015-07-09 18:24:38.968355881 +0200 -+++ gdb-7.9.90.20150709/gdb/ada-lang.c 2015-07-09 18:24:42.219383612 +0200 -@@ -74,7 +74,7 @@ static struct type *desc_bounds_type (st +--- gdb-7.10.50.20151027.orig/gdb/ada-lang.c 2015-11-02 21:23:11.175351410 +0100 ++++ gdb-7.10.50.20151027/gdb/ada-lang.c 2015-11-02 21:23:13.197364714 +0100 +@@ -75,7 +75,7 @@ static struct type *desc_bounds_type (st static struct value *desc_bounds (struct value *); @@ -476,7 +476,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c static int fat_pntr_bounds_bitsize (struct type *); -@@ -82,13 +82,13 @@ static struct type *desc_data_target_typ +@@ -83,13 +83,13 @@ static struct type *desc_data_target_typ static struct value *desc_data (struct value *); @@ -492,7 +492,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c static int desc_bound_bitsize (struct type *, int, int); -@@ -168,7 +168,7 @@ static struct type *static_unwrap_type ( +@@ -172,7 +172,7 @@ static struct type *static_unwrap_type ( static struct value *unwrap_value (struct value *); @@ -501,7 +501,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c static struct type *decode_constrained_packed_array_type (struct type *); -@@ -183,7 +183,8 @@ static int ada_is_unconstrained_packed_a +@@ -187,7 +187,8 @@ static int ada_is_unconstrained_packed_a static struct value *value_subscript_packed (struct value *, int, struct value **); @@ -511,12 +511,12 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c static struct value *coerce_unspec_val_to_type (struct value *, struct type *); -@@ -211,14 +212,14 @@ static struct value *value_val_atr (stru +@@ -215,14 +216,14 @@ static struct value *value_val_atr (stru static struct symbol *standard_lookup (const char *, const struct block *, domain_enum); --static struct value *ada_search_struct_field (char *, struct value *, int, -+static struct value *ada_search_struct_field (char *, struct value *, LONGEST, +-static struct value *ada_search_struct_field (const char *, struct value *, int, ++static struct value *ada_search_struct_field (const char *, struct value *, LONGEST, struct type *); -static struct value *ada_value_primitive_field (struct value *, int, int, @@ -526,11 +526,11 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c -static int find_struct_field (const char *, struct type *, int, - struct type **, int *, int *, int *, int *); +static int find_struct_field (const char *, struct type *, LONGEST, -+ struct type **, LONGEST *, int *, int *, int *); ++ struct type **, LONGEST *, int *, int *, int *); static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR, struct value *); -@@ -232,7 +233,7 @@ static int ada_is_direct_array_type (str +@@ -236,7 +237,7 @@ static int ada_is_direct_array_type (str static void ada_language_arch_info (struct gdbarch *, struct language_arch_info *); @@ -539,7 +539,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *); static struct value *assign_aggregate (struct value *, struct value *, -@@ -695,7 +696,7 @@ coerce_unspec_val_to_type (struct value +@@ -700,7 +701,7 @@ coerce_unspec_val_to_type (struct value } static const gdb_byte * @@ -548,7 +548,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c { if (valaddr == NULL) return NULL; -@@ -704,7 +705,7 @@ cond_offset_host (const gdb_byte *valadd +@@ -709,7 +710,7 @@ cond_offset_host (const gdb_byte *valadd } static CORE_ADDR @@ -557,7 +557,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c { if (address == 0) return 0; -@@ -1711,7 +1712,7 @@ desc_bounds (struct value *arr) +@@ -1717,7 +1718,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.9.90.20150709/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) +@@ -1783,7 +1784,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.9.90.20150709/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 +@@ -1818,7 +1819,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.9.90.20150709/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 +@@ -2008,7 +2009,7 @@ ada_type_of_array (struct value *arr, in zero, and does not need to be recomputed. */ if (lo < hi) { @@ -593,7 +593,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0); TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8; -@@ -2162,7 +2163,7 @@ decode_packed_array_bitsize (struct type +@@ -2168,7 +2169,7 @@ decode_packed_array_bitsize (struct type the length is arbitrary. */ static struct type * @@ -602,7 +602,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c { struct type *new_elt_type; struct type *new_type; -@@ -2216,7 +2217,7 @@ decode_constrained_packed_array_type (st +@@ -2222,7 +2223,7 @@ decode_constrained_packed_array_type (st char *name; const char *tail; struct type *shadow_type; @@ -611,7 +611,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); -@@ -2287,7 +2288,8 @@ decode_constrained_packed_array (struct +@@ -2293,7 +2294,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.9.90.20150709/gdb/ada-lang.c ULONGEST mod; mod = ada_modulus (value_type (arr)) - 1; -@@ -2388,15 +2390,16 @@ has_negatives (struct type *type) +@@ -2521,7 +2523,7 @@ ada_unpack_from_contents (const gdb_byte struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, @@ -630,21 +630,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *type) { struct value *v; -- int src, /* Index into the source area */ -- targ, /* Index into the target area */ -- srcBitsLeft, /* Number of source bits left to move */ -- nsrc, ntarg, /* Number of source and target bytes */ -- unusedLS, /* Number of bits in next significant -+ int src; /* Index into the source area */ -+ LONGEST targ; /* Index into the target area */ -+ int srcBitsLeft, /* Number of source bits left to move */ -+ nsrc; /* Number of source bytes */ -+ LONGEST ntarg; /* Number of target bytes */ -+ int unusedLS, /* Number of bits in next significant - byte of source that are unused */ - accumSize; /* Number of meaningful bits in accum */ - unsigned char *bytes; /* First byte containing data to unpack */ -@@ -2441,7 +2444,7 @@ ada_value_primitive_packed_val (struct v +@@ -2594,7 +2596,7 @@ ada_value_primitive_packed_val (struct v if (obj != NULL) { @@ -653,7 +639,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c set_value_component_location (v, obj); set_value_bitpos (v, bit_offset + value_bitpos (obj)); -@@ -2562,7 +2565,7 @@ ada_value_primitive_packed_val (struct v +@@ -2642,7 +2644,7 @@ ada_value_primitive_packed_val (struct v not overlap. */ static void move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source, @@ -662,16 +648,16 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c { unsigned int accum, mask; int accum_bits, chunk_size; -@@ -2652,7 +2655,7 @@ ada_value_assign (struct value *toval, s +@@ -2732,7 +2734,7 @@ ada_value_assign (struct value *toval, s { int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; - int from_size; + LONGEST from_size; - gdb_byte *buffer = alloca (len); + gdb_byte *buffer = (gdb_byte *) alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); -@@ -2703,7 +2706,7 @@ value_assign_to_component (struct value +@@ -2783,7 +2785,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 +666,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4294,7 +4297,7 @@ ensure_lval (struct value *val) +@@ -4392,7 +4394,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -689,16 +675,16 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4378,7 +4381,7 @@ static CORE_ADDR +@@ -4476,7 +4478,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); - unsigned len = TYPE_LENGTH (type); + ULONGEST len = TYPE_LENGTH (type); - gdb_byte *buf = alloca (len); + gdb_byte *buf = (gdb_byte *) alloca (len); CORE_ADDR addr; -@@ -6521,7 +6524,7 @@ value_tag_from_contents_and_address (str +@@ -6711,7 +6713,7 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { @@ -707,7 +693,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -6991,7 +6994,7 @@ ada_in_variant (LONGEST val, struct type +@@ -7181,7 +7183,7 @@ ada_in_variant (LONGEST val, struct type only in that it can handle packed values of arbitrary type. */ static struct value * @@ -716,7 +702,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -7003,7 +7006,7 @@ ada_value_primitive_field (struct value +@@ -7193,7 +7195,7 @@ ada_value_primitive_field (struct value if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -725,7 +711,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7030,9 +7033,9 @@ ada_value_primitive_field (struct value +@@ -7220,9 +7222,9 @@ ada_value_primitive_field (struct value Returns 1 if found, 0 otherwise. */ static int @@ -737,7 +723,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c int *index_p) { int i; -@@ -7050,8 +7053,8 @@ find_struct_field (const char *name, str +@@ -7240,8 +7242,8 @@ find_struct_field (const char *name, str for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -748,16 +734,16 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -7121,7 +7124,7 @@ num_visible_fields (struct type *type) +@@ -7311,7 +7313,7 @@ num_visible_fields (struct type *type) Searches recursively through wrapper fields (e.g., '_parent'). */ static struct value * --ada_search_struct_field (char *name, struct value *arg, int offset, -+ada_search_struct_field (char *name, struct value *arg, LONGEST offset, +-ada_search_struct_field (const char *name, struct value *arg, int offset, ++ada_search_struct_field (const char *name, struct value *arg, LONGEST offset, struct type *type) { int i; -@@ -7154,7 +7157,7 @@ ada_search_struct_field (char *name, str +@@ -7344,7 +7346,7 @@ ada_search_struct_field (const char *nam int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -766,7 +752,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7172,8 +7175,8 @@ ada_search_struct_field (char *name, str +@@ -7362,8 +7364,8 @@ ada_search_struct_field (const char *nam return NULL; } @@ -777,7 +763,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -7182,7 +7185,7 @@ static struct value *ada_index_struct_fi +@@ -7372,7 +7374,7 @@ static struct value *ada_index_struct_fi * If found, return value, else return NULL. */ static struct value * @@ -786,7 +772,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7194,7 +7197,7 @@ ada_index_struct_field (int index, struc +@@ -7384,7 +7386,7 @@ ada_index_struct_field (int index, struc * *INDEX_P. */ static struct value * @@ -795,7 +781,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *type) { int i; -@@ -7284,7 +7287,8 @@ ada_value_struct_elt (struct value *arg, +@@ -7474,7 +7476,8 @@ ada_value_struct_elt (struct value *arg, v = ada_search_struct_field (name, arg, 0, t); else { @@ -805,7 +791,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7601,8 +7605,8 @@ ada_coerce_ref (struct value *val0) +@@ -7791,8 +7794,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -816,7 +802,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -7996,10 +8000,9 @@ ada_template_to_fixed_record_type_1 (str +@@ -8186,10 +8189,9 @@ ada_template_to_fixed_record_type_1 (str struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -829,7 +815,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -8077,7 +8080,7 @@ ada_template_to_fixed_record_type_1 (str +@@ -8267,7 +8269,7 @@ ada_template_to_fixed_record_type_1 (str that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -838,7 +824,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8213,11 +8216,11 @@ ada_template_to_fixed_record_type_1 (str +@@ -8403,11 +8405,11 @@ ada_template_to_fixed_record_type_1 (str if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -854,7 +840,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.c } else { -@@ -8684,7 +8687,8 @@ to_fixed_array_type (struct type *type0, +@@ -8874,7 +8876,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 +850,11 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/ada-lang.h +Index: gdb-7.10.50.20151027/gdb/ada-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ada-lang.h 2015-07-09 18:24:38.969355889 +0200 -+++ gdb-7.9.90.20150709/gdb/ada-lang.h 2015-07-09 18:24:42.219383612 +0200 -@@ -179,7 +179,7 @@ extern void ada_print_type (struct type +--- gdb-7.10.50.20151027.orig/gdb/ada-lang.h 2015-11-02 21:23:11.177351423 +0100 ++++ gdb-7.10.50.20151027/gdb/ada-lang.h 2015-11-02 21:23:13.198364721 +0100 +@@ -168,7 +168,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 +863,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -@@ -194,7 +194,7 @@ extern void ada_emit_char (int, struct t +@@ -183,7 +183,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 +872,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.h const struct value_print_options *); struct value *ada_convert_actual (struct value *actual, -@@ -265,7 +265,7 @@ extern int ada_is_constrained_packed_arr +@@ -255,7 +255,7 @@ extern int ada_is_constrained_packed_arr extern struct value *ada_value_primitive_packed_val (struct value *, const gdb_byte *, @@ -895,11 +881,11 @@ Index: gdb-7.9.90.20150709/gdb/ada-lang.h struct type *); extern struct type *ada_coerce_to_simple_array_type (struct type *); -Index: gdb-7.9.90.20150709/gdb/ada-typeprint.c +Index: gdb-7.10.50.20151027/gdb/ada-typeprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ada-typeprint.c 2015-07-09 18:24:38.969355889 +0200 -+++ gdb-7.9.90.20150709/gdb/ada-typeprint.c 2015-07-09 18:24:42.220383621 +0200 -@@ -886,8 +886,8 @@ ada_print_type (struct type *type0, cons +--- gdb-7.10.50.20151027.orig/gdb/ada-typeprint.c 2015-11-02 21:23:11.177351423 +0100 ++++ gdb-7.10.50.20151027/gdb/ada-typeprint.c 2015-11-02 21:23:13.198364721 +0100 +@@ -891,8 +891,8 @@ ada_print_type (struct type *type0, cons const char *name = ada_type_name (type); if (!ada_is_range_type_name (name)) @@ -910,7 +896,7 @@ Index: gdb-7.9.90.20150709/gdb/ada-typeprint.c else { fprintf_filtered (stream, "range "); -@@ -908,7 +908,8 @@ ada_print_type (struct type *type0, cons +@@ -913,7 +913,8 @@ ada_print_type (struct type *type0, cons } break; case TYPE_CODE_FLT: @@ -920,10 +906,10 @@ Index: gdb-7.9.90.20150709/gdb/ada-typeprint.c break; case TYPE_CODE_ENUM: if (show < 0) -Index: gdb-7.9.90.20150709/gdb/ada-valprint.c +Index: gdb-7.10.50.20151027/gdb/ada-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ada-valprint.c 2015-07-09 18:24:38.970355898 +0200 -+++ gdb-7.9.90.20150709/gdb/ada-valprint.c 2015-07-09 18:24:42.220383621 +0200 +--- gdb-7.10.50.20151027.orig/gdb/ada-valprint.c 2015-11-02 21:23:11.179351436 +0100 ++++ gdb-7.10.50.20151027/gdb/ada-valprint.c 2015-11-02 21:23:13.199364728 +0100 @@ -33,11 +33,11 @@ #include "objfiles.h" @@ -1068,10 +1054,10 @@ Index: gdb-7.9.90.20150709/gdb/ada-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.9.90.20150709/gdb/annotate.c +Index: gdb-7.10.50.20151027/gdb/annotate.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/annotate.c 2015-07-09 18:24:38.971355906 +0200 -+++ gdb-7.9.90.20150709/gdb/annotate.c 2015-07-09 18:24:42.221383629 +0200 +--- gdb-7.10.50.20151027.orig/gdb/annotate.c 2015-11-02 21:23:11.179351436 +0100 ++++ gdb-7.10.50.20151027/gdb/annotate.c 2015-11-02 21:23:13.199364728 +0100 @@ -542,21 +542,21 @@ annotate_frame_end (void) } @@ -1098,10 +1084,10 @@ Index: gdb-7.9.90.20150709/gdb/annotate.c } void -Index: gdb-7.9.90.20150709/gdb/annotate.h +Index: gdb-7.10.50.20151027/gdb/annotate.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/annotate.h 2015-07-09 18:24:38.971355906 +0200 -+++ gdb-7.9.90.20150709/gdb/annotate.h 2015-07-09 18:24:42.221383629 +0200 +--- gdb-7.10.50.20151027.orig/gdb/annotate.h 2015-11-02 21:23:11.179351436 +0100 ++++ gdb-7.10.50.20151027/gdb/annotate.h 2015-11-02 21:23:13.199364728 +0100 @@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v extern void annotate_frame_where (void); extern void annotate_frame_end (void); @@ -1113,11 +1099,11 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/arm-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/arm-linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/arm-linux-nat.c 2015-07-09 18:24:38.971355906 +0200 -+++ gdb-7.9.90.20150709/gdb/arm-linux-nat.c 2015-07-09 18:24:42.221383629 +0200 -@@ -1362,7 +1362,7 @@ arm_linux_remove_hw_breakpoint (struct t +--- gdb-7.10.50.20151027.orig/gdb/arm-linux-nat.c 2015-11-02 21:23:11.180351443 +0100 ++++ gdb-7.10.50.20151027/gdb/arm-linux-nat.c 2015-11-02 21:23:13.200364734 +0100 +@@ -1099,7 +1099,7 @@ arm_linux_remove_hw_breakpoint (struct t ADDR? */ static int arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -1126,11 +1112,11 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/ax-gdb.c +Index: gdb-7.10.50.20151027/gdb/ax-gdb.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ax-gdb.c 2015-07-09 18:24:38.973355923 +0200 -+++ gdb-7.9.90.20150709/gdb/ax-gdb.c 2015-07-09 18:24:42.222383638 +0200 -@@ -82,12 +82,12 @@ static void gen_traced_pop (struct gdbar +--- gdb-7.10.50.20151027.orig/gdb/ax-gdb.c 2015-11-02 21:23:11.182351456 +0100 ++++ gdb-7.10.50.20151027/gdb/ax-gdb.c 2015-11-02 21:23:13.201364741 +0100 +@@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar static void gen_sign_extend (struct agent_expr *, struct type *); static void gen_extend (struct agent_expr *, struct type *); static void gen_fetch (struct agent_expr *, struct type *); @@ -1145,7 +1131,7 @@ Index: gdb-7.9.90.20150709/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); -@@ -135,15 +135,16 @@ static void gen_deref (struct agent_expr +@@ -136,15 +136,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, @@ -1165,7 +1151,7 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c struct type *type); static void gen_struct_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, -@@ -538,7 +539,7 @@ gen_fetch (struct agent_expr *ax, struct +@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct right shift it by -DISTANCE bits if DISTANCE < 0. This generates unsigned (logical) right shifts. */ static void @@ -1174,7 +1160,7 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c { if (distance > 0) { -@@ -592,7 +593,7 @@ gen_frame_locals_address (struct gdbarch +@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch programming in ML, it would be clearer why these are the same thing. */ static void @@ -1183,7 +1169,7 @@ Index: gdb-7.9.90.20150709/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 -@@ -1248,7 +1249,7 @@ gen_address_of (struct agent_expr *ax, s +@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax, struct axs_value *value, struct type *type, @@ -1192,7 +1178,7 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c { /* Note that ops[i] fetches 8 << i bits. */ static enum agent_op ops[] -@@ -1283,13 +1284,13 @@ gen_bitfield_ref (struct expression *exp +@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp /* The first and one-after-last bits in the field, but rounded down and up to byte boundaries. */ @@ -1211,7 +1197,7 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c /* The index in ops of the opcode we're considering. */ int op; -@@ -1408,7 +1409,7 @@ gen_bitfield_ref (struct expression *exp +@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp static void gen_primitive_field (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1220,7 +1206,7 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c { /* Is this a bitfield? */ if (TYPE_FIELD_PACKED (type, fieldno)) -@@ -1433,7 +1434,7 @@ gen_primitive_field (struct expression * +@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression * static int gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax, struct axs_value *value, @@ -1229,11 +1215,11 @@ Index: gdb-7.9.90.20150709/gdb/ax-gdb.c { int i, rslt; int nbases = TYPE_N_BASECLASSES (type); -Index: gdb-7.9.90.20150709/gdb/ax-general.c +Index: gdb-7.10.50.20151027/gdb/ax-general.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ax-general.c 2015-07-09 18:24:38.973355923 +0200 -+++ gdb-7.9.90.20150709/gdb/ax-general.c 2015-07-09 18:24:42.223383646 +0200 -@@ -193,7 +193,7 @@ ax_zero_ext (struct agent_expr *x, int n +--- gdb-7.10.50.20151027.orig/gdb/ax-general.c 2015-11-02 21:23:11.182351456 +0100 ++++ gdb-7.10.50.20151027/gdb/ax-general.c 2015-11-02 21:23:13.201364741 +0100 +@@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n /* Append a trace_quick instruction to EXPR, to record N bytes. */ void @@ -1242,10 +1228,10 @@ Index: gdb-7.9.90.20150709/gdb/ax-general.c { /* N must fit in a byte. */ if (n < 0 || n > 255) -Index: gdb-7.9.90.20150709/gdb/ax.h +Index: gdb-7.10.50.20151027/gdb/ax.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ax.h 2015-07-09 18:24:38.973355923 +0200 -+++ gdb-7.9.90.20150709/gdb/ax.h 2015-07-09 18:24:42.223383646 +0200 +--- gdb-7.10.50.20151027.orig/gdb/ax.h 2015-11-02 21:23:11.183351463 +0100 ++++ gdb-7.10.50.20151027/gdb/ax.h 2015-11-02 21:23:13.201364741 +0100 @@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E extern void ax_zero_ext (struct agent_expr *EXPR, int N); @@ -1255,11 +1241,11 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/breakpoint.c +Index: gdb-7.10.50.20151027/gdb/breakpoint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/breakpoint.c 2015-07-09 18:24:38.977355958 +0200 -+++ gdb-7.9.90.20150709/gdb/breakpoint.c 2015-07-09 18:24:42.227383680 +0200 -@@ -2202,9 +2202,9 @@ should_be_inserted (struct bp_location * +--- gdb-7.10.50.20151027.orig/gdb/breakpoint.c 2015-11-02 21:23:11.188351496 +0100 ++++ gdb-7.10.50.20151027/gdb/breakpoint.c 2015-11-02 21:23:13.205364767 +0100 +@@ -2215,9 +2215,9 @@ should_be_inserted (struct bp_location * { fprintf_unfiltered (gdb_stdlog, "infrun: stepping past non-steppable watchpoint. " @@ -1271,7 +1257,7 @@ Index: gdb-7.9.90.20150709/gdb/breakpoint.c } return 0; } -@@ -6995,7 +6995,7 @@ breakpoint_address_match (struct address +@@ -7053,7 +7053,7 @@ breakpoint_address_match (struct address static int breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1, @@ -1280,7 +1266,7 @@ Index: gdb-7.9.90.20150709/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -11302,7 +11302,7 @@ can_use_hardware_watchpoint (struct valu +@@ -11387,7 +11387,7 @@ can_use_hardware_watchpoint (struct valu && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1289,11 +1275,11 @@ Index: gdb-7.9.90.20150709/gdb/breakpoint.c int num_regs; len = (target_exact_watchpoints -Index: gdb-7.9.90.20150709/gdb/breakpoint.h +Index: gdb-7.10.50.20151027/gdb/breakpoint.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/breakpoint.h 2015-07-09 18:24:38.978355966 +0200 -+++ gdb-7.9.90.20150709/gdb/breakpoint.h 2015-07-09 18:24:42.227383680 +0200 -@@ -236,7 +236,7 @@ struct bp_target_info +--- gdb-7.10.50.20151027.orig/gdb/breakpoint.h 2015-11-02 21:23:11.190351509 +0100 ++++ gdb-7.10.50.20151027/gdb/breakpoint.h 2015-11-02 21:23:13.206364773 +0100 +@@ -237,7 +237,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. */ @@ -1302,7 +1288,7 @@ Index: gdb-7.9.90.20150709/gdb/breakpoint.h /* If the breakpoint lives in memory and reading that memory would give back the breakpoint, instead of the original contents, then -@@ -412,7 +412,7 @@ struct bp_location +@@ -413,7 +413,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. */ @@ -1311,10 +1297,10 @@ Index: gdb-7.9.90.20150709/gdb/breakpoint.h /* Type of hardware watchpoint. */ enum target_hw_bp_type watchpoint_type; -Index: gdb-7.9.90.20150709/gdb/c-lang.c +Index: gdb-7.10.50.20151027/gdb/c-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/c-lang.c 2015-07-09 18:24:38.979355975 +0200 -+++ gdb-7.9.90.20150709/gdb/c-lang.c 2015-07-09 18:24:42.228383689 +0200 +--- gdb-7.10.50.20151027.orig/gdb/c-lang.c 2015-11-02 21:23:11.190351509 +0100 ++++ gdb-7.10.50.20151027/gdb/c-lang.c 2015-11-02 21:23:13.206364773 +0100 @@ -187,7 +187,7 @@ c_printchar (int c, struct type *type, s void @@ -1342,10 +1328,10 @@ Index: gdb-7.9.90.20150709/gdb/c-lang.c if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type), &low_bound, &high_bound) < 0) -Index: gdb-7.9.90.20150709/gdb/c-lang.h +Index: gdb-7.10.50.20151027/gdb/c-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/c-lang.h 2015-07-09 18:24:38.979355975 +0200 -+++ gdb-7.9.90.20150709/gdb/c-lang.h 2015-07-09 18:24:42.228383689 +0200 +--- gdb-7.10.50.20151027.orig/gdb/c-lang.h 2015-11-02 21:23:11.191351515 +0100 ++++ gdb-7.10.50.20151027/gdb/c-lang.h 2015-11-02 21:23:13.206364773 +0100 @@ -74,7 +74,7 @@ extern void c_print_typedef (struct type struct ui_file *); @@ -1381,11 +1367,40 @@ Index: gdb-7.9.90.20150709/gdb/c-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *, -Index: gdb-7.9.90.20150709/gdb/c-valprint.c +Index: gdb-7.10.50.20151027/gdb/c-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/c-valprint.c 2015-07-09 18:24:38.979355975 +0200 -+++ gdb-7.9.90.20150709/gdb/c-valprint.c 2015-07-09 18:24:42.228383689 +0200 -@@ -132,7 +132,7 @@ static const struct generic_val_print_de +--- gdb-7.10.50.20151027.orig/gdb/c-valprint.c 2015-11-02 21:23:11.191351515 +0100 ++++ gdb-7.10.50.20151027/gdb/c-valprint.c 2015-11-02 21:23:13.207364780 +0100 +@@ -242,7 +242,7 @@ c_val_print_array (struct type *type, co + if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (unresolved_elttype) > 0) + { + LONGEST low_bound, high_bound; +- int eltlen, len; ++ LONGEST eltlen, len; + struct gdbarch *gdbarch = get_type_arch (type); + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + unsigned int i = 0; /* Number of characters printed. */ +@@ -316,8 +316,8 @@ c_val_print_array (struct type *type, co + if (cp_is_vtbl_ptr_type (elttype)) + { + i = 1; +- fprintf_filtered (stream, _("%d vtable entries"), +- len - 1); ++ fprintf_filtered (stream, _("%s vtable entries"), ++ plongest (len - 1)); + } + else + { +@@ -394,7 +394,7 @@ c_val_print_struct (struct type *type, c + -fvtable_thunks. (Otherwise, look under + TYPE_CODE_PTR.) */ + struct gdbarch *gdbarch = get_type_arch (type); +- int offset = (embedded_offset ++ LONGEST offset = (embedded_offset + + TYPE_FIELD_BITPOS (type, + VTBL_FNADDR_OFFSET) / 8); + struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET); +@@ -493,7 +493,7 @@ c_val_print_memberptr (struct type *type void c_val_print (struct type *type, const gdb_byte *valaddr, @@ -1394,29 +1409,7 @@ Index: gdb-7.9.90.20150709/gdb/c-valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options) -@@ -143,7 +143,7 @@ c_val_print (struct type *type, const gd - unsigned len; - struct type *elttype, *unresolved_elttype; - struct type *unresolved_type = type; -- unsigned eltlen; -+ ULONGEST eltlen; - CORE_ADDR addr; - - CHECK_TYPEDEF (type); -@@ -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.) */ -- int offset = (embedded_offset -- + TYPE_FIELD_BITPOS (type, -- VTBL_FNADDR_OFFSET) / 8); -+ LONGEST offset = (embedded_offset -+ + TYPE_FIELD_BITPOS (type, -+ VTBL_FNADDR_OFFSET) / 8); - struct type *field_type = TYPE_FIELD_TYPE (type, - VTBL_FNADDR_OFFSET); - CORE_ADDR addr -@@ -460,7 +460,8 @@ c_value_print (struct value *val, struct +@@ -565,7 +565,8 @@ c_value_print (struct value *val, struct const struct value_print_options *options) { struct type *type, *real_type, *val_type; @@ -1426,10 +1419,10 @@ Index: gdb-7.9.90.20150709/gdb/c-valprint.c struct value_print_options opts = *options; opts.deref_ref = 1; -Index: gdb-7.9.90.20150709/gdb/cp-abi.c +Index: gdb-7.10.50.20151027/gdb/cp-abi.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/cp-abi.c 2015-07-09 18:24:38.980355983 +0200 -+++ gdb-7.9.90.20150709/gdb/cp-abi.c 2015-07-09 18:24:42.228383689 +0200 +--- gdb-7.10.50.20151027.orig/gdb/cp-abi.c 2015-11-02 21:23:11.192351522 +0100 ++++ gdb-7.10.50.20151027/gdb/cp-abi.c 2015-11-02 21:23:13.207364780 +0100 @@ -64,12 +64,12 @@ is_operator_name (const char *name) return (*current_cp_abi.is_operator_name) (name); } @@ -1464,10 +1457,10 @@ Index: gdb-7.9.90.20150709/gdb/cp-abi.c { struct type *ret = NULL; -Index: gdb-7.9.90.20150709/gdb/cp-abi.h +Index: gdb-7.10.50.20151027/gdb/cp-abi.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/cp-abi.h 2015-07-09 18:24:38.980355983 +0200 -+++ gdb-7.9.90.20150709/gdb/cp-abi.h 2015-07-09 18:24:42.229383698 +0200 +--- gdb-7.10.50.20151027.orig/gdb/cp-abi.h 2015-11-02 21:23:11.192351522 +0100 ++++ gdb-7.10.50.20151027/gdb/cp-abi.h 2015-11-02 21:23:13.207364780 +0100 @@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi struct fn_field *f, int j, @@ -1522,10 +1515,10 @@ Index: gdb-7.9.90.20150709/gdb/cp-abi.h void (*print_method_ptr) (const gdb_byte *contents, struct type *type, struct ui_file *stream); -Index: gdb-7.9.90.20150709/gdb/cp-valprint.c +Index: gdb-7.10.50.20151027/gdb/cp-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/cp-valprint.c 2015-07-09 18:24:38.980355983 +0200 -+++ gdb-7.9.90.20150709/gdb/cp-valprint.c 2015-07-09 18:24:42.229383698 +0200 +--- gdb-7.10.50.20151027.orig/gdb/cp-valprint.c 2015-11-02 21:23:11.193351529 +0100 ++++ gdb-7.10.50.20151027/gdb/cp-valprint.c 2015-11-02 21:23:13.208364787 +0100 @@ -80,7 +80,7 @@ static void cp_print_static_field (struc const struct value_print_options *); @@ -1599,11 +1592,11 @@ Index: gdb-7.9.90.20150709/gdb/cp-valprint.c int skip = 0; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); const char *basename = TYPE_NAME (baseclass); -Index: gdb-7.9.90.20150709/gdb/d-lang.h +Index: gdb-7.10.50.20151027/gdb/d-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/d-lang.h 2015-07-09 18:24:38.981355992 +0200 -+++ gdb-7.9.90.20150709/gdb/d-lang.h 2015-07-09 18:24:42.229383698 +0200 -@@ -71,7 +71,7 @@ extern const struct builtin_d_type *buil +--- gdb-7.10.50.20151027.orig/gdb/d-lang.h 2015-11-02 21:23:11.193351529 +0100 ++++ gdb-7.10.50.20151027/gdb/d-lang.h 2015-11-02 21:23:13.208364787 +0100 +@@ -81,7 +81,7 @@ extern struct block_symbol d_lookup_nest /* Defined in d-valprint.c */ extern void d_val_print (struct type *type, const gdb_byte *valaddr, @@ -1612,10 +1605,10 @@ Index: gdb-7.9.90.20150709/gdb/d-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.9.90.20150709/gdb/d-valprint.c +Index: gdb-7.10.50.20151027/gdb/d-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/d-valprint.c 2015-07-09 18:24:38.981355992 +0200 -+++ gdb-7.9.90.20150709/gdb/d-valprint.c 2015-07-09 18:24:42.229383698 +0200 +--- gdb-7.10.50.20151027.orig/gdb/d-valprint.c 2015-11-02 21:23:11.193351529 +0100 ++++ gdb-7.10.50.20151027/gdb/d-valprint.c 2015-11-02 21:23:13.208364787 +0100 @@ -29,7 +29,7 @@ static int @@ -1638,10 +1631,10 @@ Index: gdb-7.9.90.20150709/gdb/d-valprint.c const struct value_print_options *options) { int ret; -Index: gdb-7.9.90.20150709/gdb/doublest.c +Index: gdb-7.10.50.20151027/gdb/doublest.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/doublest.c 2015-07-09 18:24:38.981355992 +0200 -+++ gdb-7.9.90.20150709/gdb/doublest.c 2015-07-09 18:24:42.230383706 +0200 +--- gdb-7.10.50.20151027.orig/gdb/doublest.c 2015-11-02 21:23:11.194351535 +0100 ++++ gdb-7.10.50.20151027/gdb/doublest.c 2015-11-02 21:23:13.208364787 +0100 @@ -765,7 +765,7 @@ floatformat_from_doublest (const struct but not passed on by GDB. This should be fixed. */ @@ -1662,11 +1655,11 @@ Index: gdb-7.9.90.20150709/gdb/doublest.c return format; } -Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c +Index: gdb-7.10.50.20151027/gdb/dwarf2loc.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/dwarf2loc.c 2015-07-09 18:24:38.983356009 +0200 -+++ gdb-7.9.90.20150709/gdb/dwarf2loc.c 2015-07-09 18:24:42.231383715 +0200 -@@ -1557,19 +1557,19 @@ insert_bits (unsigned int datum, +--- gdb-7.10.50.20151027.orig/gdb/dwarf2loc.c 2015-11-02 21:23:11.197351555 +0100 ++++ gdb-7.10.50.20151027/gdb/dwarf2loc.c 2015-11-02 21:23:13.209364793 +0100 +@@ -1632,19 +1632,19 @@ insert_bits (unsigned int datum, BITS_BIG_ENDIAN is taken directly from gdbarch. */ static void @@ -1692,7 +1685,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c dest_avail = 8 - dest_offset_bits % 8; -@@ -1607,13 +1607,13 @@ static void +@@ -1682,13 +1682,13 @@ static void read_pieced_value (struct value *v) { int i; @@ -1708,7 +1701,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1640,8 +1640,8 @@ read_pieced_value (struct value *v) +@@ -1715,8 +1715,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]; @@ -1719,7 +1712,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c const gdb_byte *intermediate_buffer; /* Compute size, source, and destination offsets for copying, in -@@ -1790,13 +1790,13 @@ static void +@@ -1856,13 +1856,13 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; @@ -1735,7 +1728,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c size_t buffer_size = 0; gdb_byte *buffer = NULL; struct cleanup *cleanup; -@@ -1824,8 +1824,8 @@ write_pieced_value (struct value *to, st +@@ -1890,8 +1890,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]; @@ -1746,7 +1739,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c int need_bitwise; const gdb_byte *source_buffer; -@@ -1953,8 +1953,8 @@ write_pieced_value (struct value *to, st +@@ -2010,8 +2010,8 @@ write_pieced_value (struct value *to, st a synthetic pointer. */ static int @@ -1757,7 +1750,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c { struct piece_closure *c = (struct piece_closure *) value_computed_closure (value); -@@ -1967,7 +1967,7 @@ check_pieced_synthetic_pointer (const st +@@ -2024,7 +2024,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]; @@ -1766,7 +1759,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2009,9 +2009,10 @@ indirect_pieced_value (struct value *val +@@ -2066,9 +2066,10 @@ indirect_pieced_value (struct value *val struct type *type; struct frame_info *frame; struct dwarf2_locexpr_baton baton; @@ -1779,7 +1772,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c enum bfd_endian byte_order; type = check_typedef (value_type (value)); -@@ -2026,7 +2027,7 @@ indirect_pieced_value (struct value *val +@@ -2083,7 +2084,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]; @@ -1788,7 +1781,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2309,7 +2310,7 @@ dwarf2_evaluate_loc_desc_full (struct ty +@@ -2363,7 +2364,7 @@ dwarf2_evaluate_loc_desc_full (struct ty struct value *value = dwarf_expr_fetch (ctx, 0); gdb_byte *contents; const gdb_byte *val_bytes; @@ -1797,11 +1790,11 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2loc.c if (byte_offset + TYPE_LENGTH (type) > n) invalid_synthetic_pointer (); -Index: gdb-7.9.90.20150709/gdb/dwarf2read.c +Index: gdb-7.10.50.20151027/gdb/dwarf2read.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/dwarf2read.c 2015-07-09 18:24:38.989356060 +0200 -+++ gdb-7.9.90.20150709/gdb/dwarf2read.c 2015-07-09 18:24:42.236383757 +0200 -@@ -1910,12 +1910,12 @@ dwarf2_complex_location_expr_complaint ( +--- gdb-7.10.50.20151027.orig/gdb/dwarf2read.c 2015-11-02 21:23:11.204351601 +0100 ++++ gdb-7.10.50.20151027/gdb/dwarf2read.c 2015-11-02 21:23:13.215364833 +0100 +@@ -1917,12 +1917,12 @@ dwarf2_complex_location_expr_complaint ( } static void @@ -1818,7 +1811,7 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2read.c } static void -@@ -12524,8 +12524,8 @@ dwarf2_add_field (struct field_info *fip +@@ -12554,8 +12554,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. */ @@ -1829,10 +1822,10 @@ Index: gdb-7.9.90.20150709/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) -Index: gdb-7.9.90.20150709/gdb/eval.c +Index: gdb-7.10.50.20151027/gdb/eval.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/eval.c 2015-07-09 18:24:38.990356068 +0200 -+++ gdb-7.9.90.20150709/gdb/eval.c 2015-07-09 18:24:42.237383766 +0200 +--- gdb-7.10.50.20151027.orig/gdb/eval.c 2015-11-02 21:23:11.206351614 +0100 ++++ gdb-7.10.50.20151027/gdb/eval.c 2015-11-02 21:23:13.216364839 +0100 @@ -317,7 +317,8 @@ evaluate_struct_tuple (struct value *str while (--nargs >= 0) { @@ -1852,7 +1845,7 @@ Index: gdb-7.9.90.20150709/gdb/eval.c if (exp->elts[*pos].opcode == BINOP_COMMA) { -@@ -525,11 +526,11 @@ binop_promote (const struct language_def +@@ -526,11 +527,11 @@ binop_promote (const struct language_def /* FIXME: Also mixed integral/booleans, with result an integer. */ { const struct builtin_type *builtin = builtin_type (gdbarch); @@ -1867,7 +1860,7 @@ Index: gdb-7.9.90.20150709/gdb/eval.c int unsigned_operation; /* Determine type length and signedness after promotion for -@@ -711,7 +712,7 @@ evaluate_subexp_standard (struct type *e +@@ -712,7 +713,7 @@ evaluate_subexp_standard (struct type *e struct value **argvec; int code; int ix; @@ -1876,7 +1869,7 @@ Index: gdb-7.9.90.20150709/gdb/eval.c struct type **arg_types; int save_pos1; struct symbol *function = NULL; -@@ -890,7 +891,7 @@ evaluate_subexp_standard (struct type *e +@@ -891,7 +892,7 @@ evaluate_subexp_standard (struct type *e struct type *range_type = TYPE_INDEX_TYPE (type); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); @@ -1895,10 +1888,10 @@ Index: gdb-7.9.90.20150709/gdb/eval.c struct value_print_options opts; get_user_print_options (&opts); -Index: gdb-7.9.90.20150709/gdb/f-lang.c +Index: gdb-7.10.50.20151027/gdb/f-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/f-lang.c 2015-07-09 18:24:38.991356077 +0200 -+++ gdb-7.9.90.20150709/gdb/f-lang.c 2015-07-09 18:24:42.237383766 +0200 +--- gdb-7.10.50.20151027.orig/gdb/f-lang.c 2015-11-02 21:23:11.206351614 +0100 ++++ gdb-7.10.50.20151027/gdb/f-lang.c 2015-11-02 21:23:13.216364839 +0100 @@ -103,7 +103,7 @@ f_printchar (int c, struct type *type, s static void @@ -1908,10 +1901,10 @@ Index: gdb-7.9.90.20150709/gdb/f-lang.c const struct value_print_options *options) { const char *type_encoding = f_get_encoding (type); -Index: gdb-7.9.90.20150709/gdb/f-lang.h +Index: gdb-7.10.50.20151027/gdb/f-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/f-lang.h 2015-07-09 18:24:38.991356077 +0200 -+++ gdb-7.9.90.20150709/gdb/f-lang.h 2015-07-09 18:24:42.238383774 +0200 +--- gdb-7.10.50.20151027.orig/gdb/f-lang.h 2015-11-02 21:23:11.207351620 +0100 ++++ gdb-7.10.50.20151027/gdb/f-lang.h 2015-11-02 21:23:13.216364839 +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 *); @@ -1921,10 +1914,10 @@ Index: gdb-7.9.90.20150709/gdb/f-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.9.90.20150709/gdb/f-valprint.c +Index: gdb-7.10.50.20151027/gdb/f-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/f-valprint.c 2015-07-09 18:24:38.991356077 +0200 -+++ gdb-7.9.90.20150709/gdb/f-valprint.c 2015-07-09 18:24:42.238383774 +0200 +--- gdb-7.10.50.20151027.orig/gdb/f-valprint.c 2015-11-02 21:23:11.207351620 +0100 ++++ gdb-7.10.50.20151027/gdb/f-valprint.c 2015-11-02 21:24:34.108897090 +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 *); @@ -1984,11 +1977,11 @@ Index: gdb-7.9.90.20150709/gdb/f-valprint.c const struct value *original_value, const struct value_print_options *options) { -Index: gdb-7.9.90.20150709/gdb/findvar.c +Index: gdb-7.10.50.20151027/gdb/findvar.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/findvar.c 2015-07-09 18:24:38.991356077 +0200 -+++ gdb-7.9.90.20150709/gdb/findvar.c 2015-07-09 18:24:42.238383774 +0200 -@@ -626,7 +626,7 @@ struct value * +--- gdb-7.10.50.20151027.orig/gdb/findvar.c 2015-11-02 21:23:11.208351627 +0100 ++++ gdb-7.10.50.20151027/gdb/findvar.c 2015-11-02 21:23:13.217364846 +0100 +@@ -801,7 +801,7 @@ struct value * default_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) { @@ -1997,7 +1990,7 @@ Index: gdb-7.9.90.20150709/gdb/findvar.c struct value *value = allocate_value (type); VALUE_LVAL (value) = lval_register; -@@ -659,10 +659,10 @@ void +@@ -834,10 +834,10 @@ void read_frame_register_value (struct value *value, struct frame_info *frame) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -2006,24 +1999,24 @@ Index: gdb-7.9.90.20150709/gdb/findvar.c + LONGEST offset = 0; + LONGEST reg_offset = value_offset (value); int regnum = VALUE_REGNUM (value); -- int len = TYPE_LENGTH (check_typedef (value_type (value))); -+ LONGEST len = TYPE_LENGTH (check_typedef (value_type (value))); +- int len = type_length_units (check_typedef (value_type (value))); ++ LONGEST len = type_length_units (check_typedef (value_type (value))); gdb_assert (VALUE_LVAL (value) == lval_register); -@@ -677,7 +677,7 @@ read_frame_register_value (struct value +@@ -852,7 +852,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; +- int reg_len = type_length_units (value_type (regval)) - reg_offset; ++ LONGEST reg_len = type_length_units (value_type (regval)) - reg_offset; /* If the register length is larger than the number of bytes remaining to copy, then only copy the appropriate bytes. */ -Index: gdb-7.9.90.20150709/gdb/frame.c +Index: gdb-7.10.50.20151027/gdb/frame.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/frame.c 2015-07-09 18:24:38.992356085 +0200 -+++ gdb-7.9.90.20150709/gdb/frame.c 2015-07-09 18:24:42.239383783 +0200 +--- gdb-7.10.50.20151027.orig/gdb/frame.c 2015-11-02 21:23:11.208351627 +0100 ++++ gdb-7.10.50.20151027/gdb/frame.c 2015-11-02 21:23:13.218364852 +0100 @@ -1272,7 +1272,7 @@ deprecated_frame_register_read (struct f int @@ -2042,11 +2035,11 @@ Index: gdb-7.9.90.20150709/gdb/frame.c /* Copy the data. */ while (len > 0) -Index: gdb-7.9.90.20150709/gdb/frame.h +Index: gdb-7.10.50.20151027/gdb/frame.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/frame.h 2015-07-09 18:24:38.992356085 +0200 -+++ gdb-7.9.90.20150709/gdb/frame.h 2015-07-09 18:24:42.239383783 +0200 -@@ -583,7 +583,7 @@ extern void put_frame_register (struct f +--- gdb-7.10.50.20151027.orig/gdb/frame.h 2015-11-02 21:23:11.209351634 +0100 ++++ gdb-7.10.50.20151027/gdb/frame.h 2015-11-02 21:23:13.218364852 +0100 +@@ -585,7 +585,7 @@ extern void put_frame_register (struct f contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ extern int get_frame_register_bytes (struct frame_info *frame, int regnum, @@ -2055,11 +2048,11 @@ Index: gdb-7.9.90.20150709/gdb/frame.h gdb_byte *myaddr, int *optimizedp, int *unavailablep); -Index: gdb-7.9.90.20150709/gdb/gdbtypes.c +Index: gdb-7.10.50.20151027/gdb/gdbtypes.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbtypes.c 2015-07-09 18:24:38.995356111 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbtypes.c 2015-07-09 18:24:42.241383800 +0200 -@@ -2698,7 +2698,7 @@ allocate_gnat_aux_type (struct type *typ +--- gdb-7.10.50.20151027.orig/gdb/gdbtypes.c 2015-11-02 21:23:11.212351653 +0100 ++++ gdb-7.10.50.20151027/gdb/gdbtypes.c 2015-11-02 21:23:13.220364866 +0100 +@@ -2719,7 +2719,7 @@ allocate_gnat_aux_type (struct type *typ least as long as OBJFILE. */ struct type * @@ -2068,7 +2061,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c const char *name, struct objfile *objfile) { struct type *type; -@@ -2938,8 +2938,8 @@ is_public_ancestor (struct type *base, s +@@ -2959,8 +2959,8 @@ is_public_ancestor (struct type *base, s static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -2079,7 +2072,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -2950,7 +2950,7 @@ is_unique_ancestor_worker (struct type * +@@ -2971,7 +2971,7 @@ is_unique_ancestor_worker (struct type * for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -2088,7 +2081,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -2991,7 +2991,7 @@ is_unique_ancestor_worker (struct type * +@@ -3012,7 +3012,7 @@ is_unique_ancestor_worker (struct type * int is_unique_ancestor (struct type *base, struct value *val) { @@ -2097,7 +2090,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4156,7 +4156,7 @@ recursive_dump_type (struct type *type, +@@ -4200,7 +4200,7 @@ recursive_dump_type (struct type *type, break; } puts_filtered ("\n"); @@ -2106,7 +2099,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -4284,8 +4284,8 @@ recursive_dump_type (struct type *type, +@@ -4328,8 +4328,8 @@ recursive_dump_type (struct type *type, idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); else printfi_filtered (spaces + 2, @@ -2117,7 +2110,7 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c TYPE_FIELD_BITSIZE (type, idx)); gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); printf_filtered (" name '%s' (", -@@ -4666,7 +4666,7 @@ copy_type (const struct type *type) +@@ -4671,7 +4671,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2126,11 +2119,11 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.c { struct type *type; -Index: gdb-7.9.90.20150709/gdb/gdbtypes.h +Index: gdb-7.10.50.20151027/gdb/gdbtypes.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gdbtypes.h 2015-07-09 18:24:38.995356111 +0200 -+++ gdb-7.9.90.20150709/gdb/gdbtypes.h 2015-07-09 18:24:42.241383800 +0200 -@@ -504,7 +504,7 @@ union field_location +--- gdb-7.10.50.20151027.orig/gdb/gdbtypes.h 2015-11-02 21:23:11.213351660 +0100 ++++ gdb-7.10.50.20151027/gdb/gdbtypes.h 2015-11-02 21:23:13.220364866 +0100 +@@ -512,7 +512,7 @@ union field_location gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. */ @@ -2140,15 +2133,15 @@ Index: gdb-7.9.90.20150709/gdb/gdbtypes.h /* * Enum value. */ LONGEST enumval; @@ -822,7 +822,7 @@ struct type - HOST_CHAR_BIT. However, this would still fail to address - machines based on a ternary or decimal representation. */ - -- unsigned length; + type_length_units function should be used in order to get the length + expressed in target addressable memory units. */ + +- unsigned int length; + ULONGEST length; /* * Core type, shared by a group of qualified types. */ -@@ -1708,11 +1708,12 @@ extern struct type *get_target_type (str +@@ -1717,11 +1717,12 @@ extern unsigned int type_length_units (s /* * Helper function to construct objfile-owned types. */ @@ -2163,10 +2156,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/gnu-v2-abi.c +Index: gdb-7.10.50.20151027/gdb/gnu-v2-abi.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gnu-v2-abi.c 2015-07-09 18:24:38.996356120 +0200 -+++ gdb-7.9.90.20150709/gdb/gnu-v2-abi.c 2015-07-09 18:24:42.241383800 +0200 +--- gdb-7.10.50.20151027.orig/gdb/gnu-v2-abi.c 2015-11-02 21:23:11.213351660 +0100 ++++ gdb-7.10.50.20151027/gdb/gnu-v2-abi.c 2015-11-02 21:23:13.221364872 +0100 @@ -82,7 +82,7 @@ gnuv2_is_operator_name (const char *name TYPE is the type in which F is located. */ static struct value * @@ -2218,10 +2211,10 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v2-abi.c gnuv2_baseclass_offset (type, i, valaddr, embedded_offset, address, val); -Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c +Index: gdb-7.10.50.20151027/gdb/gnu-v3-abi.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/gnu-v3-abi.c 2015-07-09 18:24:38.996356120 +0200 -+++ gdb-7.9.90.20150709/gdb/gnu-v3-abi.c 2015-07-09 18:24:42.242383808 +0200 +--- gdb-7.10.50.20151027.orig/gdb/gnu-v3-abi.c 2015-11-02 21:23:11.214351667 +0100 ++++ gdb-7.10.50.20151027/gdb/gnu-v3-abi.c 2015-11-02 21:23:13.221364872 +0100 @@ -108,7 +108,7 @@ build_gdb_vtable_type (struct gdbarch *a { struct type *t; @@ -2239,8 +2232,8 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c +static LONGEST vtable_address_point_offset (struct gdbarch *gdbarch) { - struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data); -@@ -285,7 +285,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc + struct type *vtable_type +@@ -286,7 +286,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc static struct type * gnuv3_rtti_type (struct value *value, @@ -2249,7 +2242,7 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c { struct gdbarch *gdbarch; struct type *values_type = check_typedef (value_type (value)); -@@ -410,7 +410,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd +@@ -411,7 +411,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, @@ -2258,7 +2251,7 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c { struct type *values_type = check_typedef (value_type (*value_p)); struct gdbarch *gdbarch; -@@ -440,16 +440,16 @@ gnuv3_virtual_fn_field (struct value **v +@@ -441,16 +441,16 @@ gnuv3_virtual_fn_field (struct value **v -1 is returned on error. */ @@ -2278,7 +2271,7 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c /* Determine architecture. */ gdbarch = get_type_arch (type); -@@ -473,7 +473,7 @@ gnuv3_baseclass_offset (struct type *typ +@@ -474,7 +474,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.")); @@ -2287,7 +2280,7 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); -@@ -517,7 +517,7 @@ gnuv3_find_method_in (struct type *domai +@@ -518,7 +518,7 @@ gnuv3_find_method_in (struct type *domai we're out of luck. */ for (i = 0; i < TYPE_N_BASECLASSES (domain); i++) { @@ -2296,10 +2289,10 @@ Index: gdb-7.9.90.20150709/gdb/gnu-v3-abi.c struct type *basetype; if (BASETYPE_VIA_VIRTUAL (domain, i)) -Index: gdb-7.9.90.20150709/gdb/go-lang.h +Index: gdb-7.10.50.20151027/gdb/go-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/go-lang.h 2015-07-09 18:24:38.997356128 +0200 -+++ gdb-7.9.90.20150709/gdb/go-lang.h 2015-07-09 18:24:42.242383808 +0200 +--- gdb-7.10.50.20151027.orig/gdb/go-lang.h 2015-11-02 21:23:11.214351667 +0100 ++++ gdb-7.10.50.20151027/gdb/go-lang.h 2015-11-02 21:23:13.221364872 +0100 @@ -85,7 +85,7 @@ extern void go_print_type (struct type * /* Defined in go-valprint.c. */ @@ -2309,10 +2302,10 @@ Index: gdb-7.9.90.20150709/gdb/go-lang.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.9.90.20150709/gdb/go-valprint.c +Index: gdb-7.10.50.20151027/gdb/go-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/go-valprint.c 2015-07-09 18:24:38.997356128 +0200 -+++ gdb-7.9.90.20150709/gdb/go-valprint.c 2015-07-09 18:24:42.242383808 +0200 +--- gdb-7.10.50.20151027.orig/gdb/go-valprint.c 2015-11-02 21:23:11.214351667 +0100 ++++ gdb-7.10.50.20151027/gdb/go-valprint.c 2015-11-02 21:23:13.222364879 +0100 @@ -37,7 +37,7 @@ static void @@ -2334,12 +2327,12 @@ Index: gdb-7.9.90.20150709/gdb/go-valprint.c + struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) { - CHECK_TYPEDEF (type); -Index: gdb-7.9.90.20150709/gdb/jv-lang.c + type = check_typedef (type); +Index: gdb-7.10.50.20151027/gdb/jv-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/jv-lang.c 2015-07-09 18:24:38.997356128 +0200 -+++ gdb-7.9.90.20150709/gdb/jv-lang.c 2015-07-09 18:24:42.243383817 +0200 -@@ -436,7 +436,7 @@ java_link_class_type (struct gdbarch *gd +--- gdb-7.10.50.20151027.orig/gdb/jv-lang.c 2015-11-02 21:23:11.215351673 +0100 ++++ gdb-7.10.50.20151027/gdb/jv-lang.c 2015-11-02 21:23:13.222364879 +0100 +@@ -440,7 +440,7 @@ java_link_class_type (struct gdbarch *gd for (i = TYPE_N_BASECLASSES (type); i < nfields; i++) { int accflags; @@ -2348,7 +2341,7 @@ Index: gdb-7.9.90.20150709/gdb/jv-lang.c if (fields == NULL) { -@@ -886,7 +886,7 @@ java_printchar (int c, struct type *type +@@ -890,7 +890,7 @@ java_printchar (int c, struct type *type static void java_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -2357,10 +2350,10 @@ Index: gdb-7.9.90.20150709/gdb/jv-lang.c const struct value_print_options *options) { const char *type_encoding = java_get_encoding (type); -Index: gdb-7.9.90.20150709/gdb/jv-lang.h +Index: gdb-7.10.50.20151027/gdb/jv-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/jv-lang.h 2015-07-09 18:24:38.997356128 +0200 -+++ gdb-7.9.90.20150709/gdb/jv-lang.h 2015-07-09 18:24:42.243383817 +0200 +--- gdb-7.10.50.20151027.orig/gdb/jv-lang.h 2015-11-02 21:23:11.215351673 +0100 ++++ gdb-7.10.50.20151027/gdb/jv-lang.h 2015-11-02 21:23:13.222364879 +0100 @@ -43,8 +43,8 @@ struct builtin_java_type extern const struct builtin_java_type *builtin_java_type (struct gdbarch *); @@ -2372,11 +2365,11 @@ Index: gdb-7.9.90.20150709/gdb/jv-lang.h const struct value *, const struct value_print_options *); -Index: gdb-7.9.90.20150709/gdb/jv-valprint.c +Index: gdb-7.10.50.20151027/gdb/jv-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/jv-valprint.c 2015-07-09 18:24:38.998356137 +0200 -+++ gdb-7.9.90.20150709/gdb/jv-valprint.c 2015-07-09 18:24:42.243383817 +0200 -@@ -265,7 +265,7 @@ java_value_print (struct value *val, str +--- gdb-7.10.50.20151027.orig/gdb/jv-valprint.c 2015-11-02 21:23:11.215351673 +0100 ++++ gdb-7.10.50.20151027/gdb/jv-valprint.c 2015-11-02 21:23:13.222364879 +0100 +@@ -266,7 +266,7 @@ java_value_print (struct value *val, str static void java_print_value_fields (struct type *type, const gdb_byte *valaddr, @@ -2385,7 +2378,7 @@ Index: gdb-7.9.90.20150709/gdb/jv-valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, -@@ -453,7 +453,7 @@ java_print_value_fields (struct type *ty +@@ -454,7 +454,7 @@ java_print_value_fields (struct type *ty void java_val_print (struct type *type, const gdb_byte *valaddr, @@ -2394,11 +2387,11 @@ Index: gdb-7.9.90.20150709/gdb/jv-valprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.9.90.20150709/gdb/language.c +Index: gdb-7.10.50.20151027/gdb/language.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/language.c 2015-07-09 18:24:38.998356137 +0200 -+++ gdb-7.9.90.20150709/gdb/language.c 2015-07-09 18:24:42.244383825 +0200 -@@ -720,7 +720,7 @@ unk_lang_printchar (int c, struct type * +--- gdb-7.10.50.20151027.orig/gdb/language.c 2015-11-02 21:23:11.216351680 +0100 ++++ gdb-7.10.50.20151027/gdb/language.c 2015-11-02 21:23:13.223364885 +0100 +@@ -739,7 +739,7 @@ unk_lang_printchar (int c, struct type * static void unk_lang_printstr (struct ui_file *stream, struct type *type, @@ -2407,7 +2400,7 @@ Index: gdb-7.9.90.20150709/gdb/language.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -739,7 +739,7 @@ unk_lang_print_type (struct type *type, +@@ -758,7 +758,7 @@ unk_lang_print_type (struct type *type, static void unk_lang_val_print (struct type *type, const gdb_byte *valaddr, @@ -2416,10 +2409,10 @@ Index: gdb-7.9.90.20150709/gdb/language.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) -Index: gdb-7.9.90.20150709/gdb/language.h +Index: gdb-7.10.50.20151027/gdb/language.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/language.h 2015-07-09 18:24:38.998356137 +0200 -+++ gdb-7.9.90.20150709/gdb/language.h 2015-07-09 18:24:42.244383825 +0200 +--- gdb-7.10.50.20151027.orig/gdb/language.h 2015-11-02 21:23:11.216351680 +0100 ++++ gdb-7.10.50.20151027/gdb/language.h 2015-11-02 21:23:13.223364885 +0100 @@ -189,7 +189,7 @@ struct language_defn struct ui_file * stream); @@ -2438,10 +2431,10 @@ Index: gdb-7.9.90.20150709/gdb/language.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options); -Index: gdb-7.9.90.20150709/gdb/m2-lang.c +Index: gdb-7.10.50.20151027/gdb/m2-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/m2-lang.c 2015-07-09 18:24:38.999356145 +0200 -+++ gdb-7.9.90.20150709/gdb/m2-lang.c 2015-07-09 18:24:42.244383825 +0200 +--- gdb-7.10.50.20151027.orig/gdb/m2-lang.c 2015-11-02 21:23:11.217351686 +0100 ++++ gdb-7.10.50.20151027/gdb/m2-lang.c 2015-11-02 21:23:13.223364885 +0100 @@ -104,10 +104,10 @@ m2_printchar (int c, struct type *type, static void @@ -2476,10 +2469,10 @@ Index: gdb-7.9.90.20150709/gdb/m2-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.9.90.20150709/gdb/m2-lang.h +Index: gdb-7.10.50.20151027/gdb/m2-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/m2-lang.h 2015-07-09 18:24:38.999356145 +0200 -+++ gdb-7.9.90.20150709/gdb/m2-lang.h 2015-07-09 18:24:42.244383825 +0200 +--- gdb-7.10.50.20151027.orig/gdb/m2-lang.h 2015-11-02 21:23:11.217351686 +0100 ++++ gdb-7.10.50.20151027/gdb/m2-lang.h 2015-11-02 21:23:13.223364885 +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); @@ -2489,10 +2482,10 @@ Index: gdb-7.9.90.20150709/gdb/m2-lang.h struct ui_file *, int, const struct value *, const struct value_print_options *); -Index: gdb-7.9.90.20150709/gdb/m2-typeprint.c +Index: gdb-7.10.50.20151027/gdb/m2-typeprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/m2-typeprint.c 2015-07-09 18:24:38.999356145 +0200 -+++ gdb-7.9.90.20150709/gdb/m2-typeprint.c 2015-07-09 18:24:42.245383834 +0200 +--- gdb-7.10.50.20151027.orig/gdb/m2-typeprint.c 2015-11-02 21:23:11.217351686 +0100 ++++ gdb-7.10.50.20151027/gdb/m2-typeprint.c 2015-11-02 21:23:13.224364892 +0100 @@ -234,9 +234,12 @@ static void m2_array (struct type *type, m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1); } @@ -2509,10 +2502,10 @@ Index: gdb-7.9.90.20150709/gdb/m2-typeprint.c } fprintf_filtered (stream, "] OF "); m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags); -Index: gdb-7.9.90.20150709/gdb/m2-valprint.c +Index: gdb-7.10.50.20151027/gdb/m2-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/m2-valprint.c 2015-07-09 18:24:38.999356145 +0200 -+++ gdb-7.9.90.20150709/gdb/m2-valprint.c 2015-07-09 18:24:42.245383834 +0200 +--- gdb-7.10.50.20151027.orig/gdb/m2-valprint.c 2015-11-02 21:23:11.217351686 +0100 ++++ gdb-7.10.50.20151027/gdb/m2-valprint.c 2015-11-02 21:23:13.224364892 +0100 @@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc struct ui_file *stream); static void @@ -2578,10 +2571,10 @@ Index: gdb-7.9.90.20150709/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -Index: gdb-7.9.90.20150709/gdb/memrange.c +Index: gdb-7.10.50.20151027/gdb/memrange.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/memrange.c 2015-07-09 18:24:38.999356145 +0200 -+++ gdb-7.9.90.20150709/gdb/memrange.c 2015-07-09 18:24:42.245383834 +0200 +--- gdb-7.10.50.20151027.orig/gdb/memrange.c 2015-11-02 21:23:11.218351693 +0100 ++++ gdb-7.10.50.20151027/gdb/memrange.c 2015-11-02 21:23:13.224364892 +0100 @@ -21,8 +21,8 @@ #include "memrange.h" @@ -2593,10 +2586,10 @@ Index: gdb-7.9.90.20150709/gdb/memrange.c { ULONGEST h, l; -Index: gdb-7.9.90.20150709/gdb/memrange.h +Index: gdb-7.10.50.20151027/gdb/memrange.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/memrange.h 2015-07-09 18:24:39.000356154 +0200 -+++ gdb-7.9.90.20150709/gdb/memrange.h 2015-07-09 18:24:42.245383834 +0200 +--- gdb-7.10.50.20151027.orig/gdb/memrange.h 2015-11-02 21:23:11.218351693 +0100 ++++ gdb-7.10.50.20151027/gdb/memrange.h 2015-11-02 21:23:13.224364892 +0100 @@ -30,7 +30,7 @@ struct mem_range CORE_ADDR start; @@ -2617,11 +2610,11 @@ Index: gdb-7.9.90.20150709/gdb/memrange.h /* Returns true if ADDR is in RANGE. */ -Index: gdb-7.9.90.20150709/gdb/mips-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/mips-linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/mips-linux-nat.c 2015-07-09 18:24:39.000356154 +0200 -+++ gdb-7.9.90.20150709/gdb/mips-linux-nat.c 2015-07-09 18:24:42.245383834 +0200 -@@ -586,7 +586,7 @@ mips_linux_stopped_data_address (struct +--- gdb-7.10.50.20151027.orig/gdb/mips-linux-nat.c 2015-11-02 21:23:11.218351693 +0100 ++++ gdb-7.10.50.20151027/gdb/mips-linux-nat.c 2015-11-02 21:23:13.225364899 +0100 +@@ -587,7 +587,7 @@ mips_linux_stopped_data_address (struct static int mips_linux_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2630,10 +2623,10 @@ Index: gdb-7.9.90.20150709/gdb/mips-linux-nat.c { struct pt_watch_regs dummy_regs; int i; -Index: gdb-7.9.90.20150709/gdb/opencl-lang.c +Index: gdb-7.10.50.20151027/gdb/opencl-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/opencl-lang.c 2015-07-09 18:24:39.000356154 +0200 -+++ gdb-7.9.90.20150709/gdb/opencl-lang.c 2015-07-09 18:24:42.246383843 +0200 +--- gdb-7.10.50.20151027.orig/gdb/opencl-lang.c 2015-11-02 21:23:11.219351699 +0100 ++++ gdb-7.10.50.20151027/gdb/opencl-lang.c 2015-11-02 21:23:13.225364899 +0100 @@ -78,11 +78,11 @@ builtin_opencl_type (struct gdbarch *gdb static struct type * @@ -2710,10 +2703,10 @@ Index: gdb-7.9.90.20150709/gdb/opencl-lang.c if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, -Index: gdb-7.9.90.20150709/gdb/p-lang.c +Index: gdb-7.10.50.20151027/gdb/p-lang.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/p-lang.c 2015-07-09 18:24:39.001356162 +0200 -+++ gdb-7.9.90.20150709/gdb/p-lang.c 2015-07-09 18:24:42.246383843 +0200 +--- gdb-7.10.50.20151027.orig/gdb/p-lang.c 2015-11-02 21:23:11.219351699 +0100 ++++ gdb-7.10.50.20151027/gdb/p-lang.c 2015-11-02 21:23:13.225364899 +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. */ @@ -2761,10 +2754,10 @@ Index: gdb-7.9.90.20150709/gdb/p-lang.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -Index: gdb-7.9.90.20150709/gdb/p-lang.h +Index: gdb-7.10.50.20151027/gdb/p-lang.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/p-lang.h 2015-07-09 18:24:39.001356162 +0200 -+++ gdb-7.9.90.20150709/gdb/p-lang.h 2015-07-09 18:24:42.246383843 +0200 +--- gdb-7.10.50.20151027.orig/gdb/p-lang.h 2015-11-02 21:23:11.219351699 +0100 ++++ gdb-7.10.50.20151027/gdb/p-lang.h 2015-11-02 21:23:13.226364905 +0100 @@ -36,7 +36,7 @@ extern void pascal_print_type (struct ty extern void pascal_print_typedef (struct type *, struct symbol *, struct ui_file *); @@ -2799,10 +2792,10 @@ Index: gdb-7.9.90.20150709/gdb/p-lang.h CORE_ADDR, struct ui_file *, int, const struct value *, -Index: gdb-7.9.90.20150709/gdb/p-valprint.c +Index: gdb-7.10.50.20151027/gdb/p-valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/p-valprint.c 2015-07-09 18:24:39.001356162 +0200 -+++ gdb-7.9.90.20150709/gdb/p-valprint.c 2015-07-09 18:24:42.247383851 +0200 +--- gdb-7.10.50.20151027.orig/gdb/p-valprint.c 2015-11-02 21:23:11.220351706 +0100 ++++ gdb-7.10.50.20151027/gdb/p-valprint.c 2015-11-02 21:23:13.226364905 +0100 @@ -57,7 +57,7 @@ static const struct generic_val_print_de void @@ -2864,10 +2857,10 @@ Index: gdb-7.9.90.20150709/gdb/p-valprint.c int skip = 0; if (BASETYPE_VIA_VIRTUAL (type, i)) -Index: gdb-7.9.90.20150709/gdb/ppc-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/ppc-linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/ppc-linux-nat.c 2015-07-09 18:24:39.002356171 +0200 -+++ gdb-7.9.90.20150709/gdb/ppc-linux-nat.c 2015-07-09 18:24:42.247383851 +0200 +--- gdb-7.10.50.20151027.orig/gdb/ppc-linux-nat.c 2015-11-02 21:23:11.221351713 +0100 ++++ gdb-7.10.50.20151027/gdb/ppc-linux-nat.c 2015-11-02 21:23:13.227364912 +0100 @@ -1449,7 +1449,7 @@ ppc_linux_can_use_hw_breakpoint (struct static int @@ -2877,10 +2870,10 @@ Index: gdb-7.9.90.20150709/gdb/ppc-linux-nat.c { /* Handle sub-8-byte quantities. */ if (len <= 0) -Index: gdb-7.9.90.20150709/gdb/printcmd.c +Index: gdb-7.10.50.20151027/gdb/printcmd.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/printcmd.c 2015-07-09 18:24:39.003356179 +0200 -+++ gdb-7.9.90.20150709/gdb/printcmd.c 2015-07-09 18:24:42.248383860 +0200 +--- gdb-7.10.50.20151027.orig/gdb/printcmd.c 2015-11-02 21:23:11.221351713 +0100 ++++ gdb-7.10.50.20151027/gdb/printcmd.c 2015-11-02 21:23:13.227364912 +0100 @@ -274,7 +274,7 @@ print_formatted (struct value *val, int struct ui_file *stream) { @@ -2890,7 +2883,7 @@ Index: gdb-7.9.90.20150709/gdb/printcmd.c if (VALUE_LVAL (val) == lval_memory) next_address = value_address (val) + len; -@@ -352,7 +352,7 @@ print_scalar_formatted (const void *vala +@@ -352,7 +352,7 @@ print_scalar_formatted (const gdb_byte * { struct gdbarch *gdbarch = get_type_arch (type); LONGEST val_long = 0; @@ -2899,11 +2892,11 @@ Index: gdb-7.9.90.20150709/gdb/printcmd.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); /* String printing should go through val_print_scalar_formatted. */ -Index: gdb-7.9.90.20150709/gdb/procfs.c +Index: gdb-7.10.50.20151027/gdb/procfs.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/procfs.c 2015-07-09 18:24:39.004356188 +0200 -+++ gdb-7.9.90.20150709/gdb/procfs.c 2015-07-09 18:24:42.249383868 +0200 -@@ -4859,7 +4859,7 @@ procfs_remove_watchpoint (struct target_ +--- gdb-7.10.50.20151027.orig/gdb/procfs.c 2015-11-02 21:23:11.223351726 +0100 ++++ gdb-7.10.50.20151027/gdb/procfs.c 2015-11-02 21:23:13.228364918 +0100 +@@ -4863,7 +4863,7 @@ procfs_remove_watchpoint (struct target_ static int procfs_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -2912,10 +2905,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/python/py-prettyprint.c +Index: gdb-7.10.50.20151027/gdb/python/py-prettyprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/python/py-prettyprint.c 2015-07-09 18:24:39.004356188 +0200 -+++ gdb-7.9.90.20150709/gdb/python/py-prettyprint.c 2015-07-09 18:24:42.249383868 +0200 +--- gdb-7.10.50.20151027.orig/gdb/python/py-prettyprint.c 2015-11-02 21:23:11.223351726 +0100 ++++ gdb-7.10.50.20151027/gdb/python/py-prettyprint.c 2015-11-02 21:23:13.229364925 +0100 @@ -703,7 +703,7 @@ print_children (PyObject *printer, const enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang, @@ -2925,11 +2918,11 @@ Index: gdb-7.9.90.20150709/gdb/python/py-prettyprint.c struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.9.90.20150709/gdb/regcache.c +Index: gdb-7.10.50.20151027/gdb/regcache.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/regcache.c 2015-07-09 18:24:39.005356196 +0200 -+++ gdb-7.9.90.20150709/gdb/regcache.c 2015-07-09 18:24:42.250383877 +0200 -@@ -949,7 +949,7 @@ typedef void (regcache_write_ftype) (str +--- gdb-7.10.50.20151027.orig/gdb/regcache.c 2015-11-02 21:23:11.224351732 +0100 ++++ gdb-7.10.50.20151027/gdb/regcache.c 2015-11-02 21:23:13.229364925 +0100 +@@ -958,7 +958,7 @@ typedef void (regcache_write_ftype) (str static enum register_status regcache_xfer_part (struct regcache *regcache, int regnum, @@ -2938,7 +2931,7 @@ Index: gdb-7.9.90.20150709/gdb/regcache.c enum register_status (*read) (struct regcache *regcache, int regnum, gdb_byte *buf), -@@ -993,7 +993,7 @@ regcache_xfer_part (struct regcache *reg +@@ -1002,7 +1002,7 @@ regcache_xfer_part (struct regcache *reg enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, @@ -2947,7 +2940,7 @@ Index: gdb-7.9.90.20150709/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1004,7 +1004,7 @@ regcache_raw_read_part (struct regcache +@@ -1013,7 +1013,7 @@ regcache_raw_read_part (struct regcache void regcache_raw_write_part (struct regcache *regcache, int regnum, @@ -2956,7 +2949,7 @@ Index: gdb-7.9.90.20150709/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1015,7 +1015,7 @@ regcache_raw_write_part (struct regcache +@@ -1024,7 +1024,7 @@ regcache_raw_write_part (struct regcache enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, @@ -2965,7 +2958,7 @@ Index: gdb-7.9.90.20150709/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -@@ -1026,7 +1026,7 @@ regcache_cooked_read_part (struct regcac +@@ -1035,7 +1035,7 @@ regcache_cooked_read_part (struct regcac void regcache_cooked_write_part (struct regcache *regcache, int regnum, @@ -2974,10 +2967,10 @@ Index: gdb-7.9.90.20150709/gdb/regcache.c { struct regcache_descr *descr = regcache->descr; -Index: gdb-7.9.90.20150709/gdb/regcache.h +Index: gdb-7.10.50.20151027/gdb/regcache.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/regcache.h 2015-07-09 18:24:39.005356196 +0200 -+++ gdb-7.9.90.20150709/gdb/regcache.h 2015-07-09 18:24:42.250383877 +0200 +--- gdb-7.10.50.20151027.orig/gdb/regcache.h 2015-11-02 21:23:11.224351732 +0100 ++++ gdb-7.10.50.20151027/gdb/regcache.h 2015-11-02 21:23:13.230364931 +0100 @@ -92,9 +92,9 @@ extern void regcache_raw_write_unsigned extern enum register_status @@ -3005,11 +2998,11 @@ Index: gdb-7.9.90.20150709/gdb/regcache.h /* Special routines to read/write the PC. */ -Index: gdb-7.9.90.20150709/gdb/remote.c +Index: gdb-7.10.50.20151027/gdb/remote.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/remote.c 2015-07-09 18:24:39.007356213 +0200 -+++ gdb-7.9.90.20150709/gdb/remote.c 2015-07-09 18:24:42.253383902 +0200 -@@ -8796,7 +8796,7 @@ int remote_hw_breakpoint_limit = -1; +--- gdb-7.10.50.20151027.orig/gdb/remote.c 2015-11-02 21:23:11.227351752 +0100 ++++ gdb-7.10.50.20151027/gdb/remote.c 2015-11-02 21:23:13.232364945 +0100 +@@ -9157,7 +9157,7 @@ int remote_hw_breakpoint_limit = -1; static int remote_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3018,11 +3011,11 @@ Index: gdb-7.9.90.20150709/gdb/remote.c { if (remote_hw_watchpoint_length_limit == 0) return 0; -Index: gdb-7.9.90.20150709/gdb/spu-multiarch.c +Index: gdb-7.10.50.20151027/gdb/spu-multiarch.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/spu-multiarch.c 2015-07-09 18:24:39.008356222 +0200 -+++ gdb-7.9.90.20150709/gdb/spu-multiarch.c 2015-07-09 18:24:42.253383902 +0200 -@@ -117,7 +117,7 @@ spu_thread_architecture (struct target_o +--- gdb-7.10.50.20151027.orig/gdb/spu-multiarch.c 2015-11-02 21:23:11.228351759 +0100 ++++ gdb-7.10.50.20151027/gdb/spu-multiarch.c 2015-11-02 21:23:13.233364951 +0100 +@@ -127,7 +127,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, @@ -3031,10 +3024,10 @@ Index: gdb-7.9.90.20150709/gdb/spu-multiarch.c { struct target_ops *ops_beneath = find_target_beneath (self); -Index: gdb-7.9.90.20150709/gdb/stack.c +Index: gdb-7.10.50.20151027/gdb/stack.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/stack.c 2015-07-09 18:24:39.009356230 +0200 -+++ gdb-7.9.90.20150709/gdb/stack.c 2015-07-09 18:24:42.254383911 +0200 +--- gdb-7.10.50.20151027.orig/gdb/stack.c 2015-11-02 21:23:11.229351765 +0100 ++++ gdb-7.10.50.20151027/gdb/stack.c 2015-11-02 21:23:13.233364951 +0100 @@ -176,7 +176,7 @@ print_stack_frame (struct frame_info *fr argument (not just the first nameless argument). */ @@ -3073,10 +3066,10 @@ Index: gdb-7.9.90.20150709/gdb/stack.c if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); -Index: gdb-7.9.90.20150709/gdb/symmisc.c +Index: gdb-7.10.50.20151027/gdb/symmisc.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/symmisc.c 2015-07-09 18:24:39.009356230 +0200 -+++ gdb-7.9.90.20150709/gdb/symmisc.c 2015-07-09 18:24:42.254383911 +0200 +--- gdb-7.10.50.20151027.orig/gdb/symmisc.c 2015-11-02 21:23:11.229351765 +0100 ++++ gdb-7.10.50.20151027/gdb/symmisc.c 2015-11-02 21:23:13.234364958 +0100 @@ -534,11 +534,11 @@ print_symbol (void *args) case LOC_CONST_BYTES: @@ -3092,10 +3085,10 @@ Index: gdb-7.9.90.20150709/gdb/symmisc.c for (i = 0; i < TYPE_LENGTH (type); i++) fprintf_filtered (outfile, " %02x", (unsigned) SYMBOL_VALUE_BYTES (symbol)[i]); -Index: gdb-7.9.90.20150709/gdb/target.c +Index: gdb-7.10.50.20151027/gdb/target.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/target.c 2015-07-09 18:24:39.010356239 +0200 -+++ gdb-7.9.90.20150709/gdb/target.c 2015-07-09 18:24:42.255383919 +0200 +--- gdb-7.10.50.20151027.orig/gdb/target.c 2015-11-02 21:23:11.230351772 +0100 ++++ gdb-7.10.50.20151027/gdb/target.c 2015-11-02 21:23:13.234364958 +0100 @@ -54,7 +54,7 @@ static int default_watchpoint_addr_withi CORE_ADDR, CORE_ADDR, int); @@ -3105,7 +3098,7 @@ Index: gdb-7.9.90.20150709/gdb/target.c static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3085,7 +3085,7 @@ target_fileio_read_stralloc (struct infe +@@ -3132,7 +3132,7 @@ target_fileio_read_stralloc (struct infe static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3114,11 +3107,11 @@ Index: gdb-7.9.90.20150709/gdb/target.c { return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT); } -Index: gdb-7.9.90.20150709/gdb/target.h +Index: gdb-7.10.50.20151027/gdb/target.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/target.h 2015-07-09 18:24:39.010356239 +0200 -+++ gdb-7.9.90.20150709/gdb/target.h 2015-07-09 18:24:42.256383928 +0200 -@@ -547,7 +547,7 @@ struct target_ops +--- gdb-7.10.50.20151027.orig/gdb/target.h 2015-11-02 21:23:11.231351779 +0100 ++++ gdb-7.10.50.20151027/gdb/target.h 2015-11-02 21:23:13.235364964 +0100 +@@ -549,7 +549,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 *, @@ -3127,11 +3120,11 @@ Index: gdb-7.9.90.20150709/gdb/target.h TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); int (*to_can_accel_watchpoint_condition) (struct target_ops *, -Index: gdb-7.9.90.20150709/gdb/tracepoint.c +Index: gdb-7.10.50.20151027/gdb/tracepoint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/tracepoint.c 2015-07-09 18:24:39.012356256 +0200 -+++ gdb-7.9.90.20150709/gdb/tracepoint.c 2015-07-09 18:24:42.257383936 +0200 -@@ -928,13 +928,13 @@ add_register (struct collection_list *co +--- gdb-7.10.50.20151027.orig/gdb/tracepoint.c 2015-11-02 21:23:11.233351792 +0100 ++++ gdb-7.10.50.20151027/gdb/tracepoint.c 2015-11-02 21:23:13.236364971 +0100 +@@ -930,13 +930,13 @@ add_register (struct collection_list *co static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, @@ -3147,7 +3140,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c } /* type: memrange_absolute == memory, other n == basereg */ -@@ -964,7 +964,7 @@ collect_symbol (struct collection_list * +@@ -966,7 +966,7 @@ collect_symbol (struct collection_list * CORE_ADDR scope, int trace_string) { @@ -3156,7 +3149,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c unsigned int reg; bfd_signed_vma offset; int treat_as_expr = 0; -@@ -988,8 +988,8 @@ collect_symbol (struct collection_list * +@@ -990,8 +990,8 @@ collect_symbol (struct collection_list * char tmp[40]; sprintf_vma (tmp, offset); @@ -3167,7 +3160,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c tmp /* address */); } /* A struct may be a C++ class with static fields, go to general -@@ -1021,8 +1021,8 @@ collect_symbol (struct collection_list * +@@ -1023,8 +1023,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3178,7 +3171,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -1033,8 +1033,8 @@ collect_symbol (struct collection_list * +@@ -1035,8 +1035,8 @@ collect_symbol (struct collection_list * offset = 0; if (info_verbose) { @@ -3189,7 +3182,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from reg %d\n", reg); } -@@ -1045,8 +1045,8 @@ collect_symbol (struct collection_list * +@@ -1047,8 +1047,8 @@ collect_symbol (struct collection_list * offset = frame_offset + SYMBOL_VALUE (sym); if (info_verbose) { @@ -3200,7 +3193,7 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c printf_vma (offset); printf_filtered (" from frame ptr reg %d\n", reg); } -@@ -2709,7 +2709,8 @@ scope_info (char *args, int from_tty) +@@ -2708,7 +2708,8 @@ scope_info (char *args, int from_tty) const char *symname; char *save_args = args; struct block_iterator iter; @@ -3209,8 +3202,8 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c + LONGEST j; struct gdbarch *gdbarch; int regno; - -@@ -2845,8 +2846,11 @@ scope_info (char *args, int from_tty) + struct event_location *location; +@@ -2852,8 +2853,11 @@ scope_info (char *args, int from_tty) } } if (SYMBOL_TYPE (sym)) @@ -3224,11 +3217,11 @@ Index: gdb-7.9.90.20150709/gdb/tracepoint.c } if (BLOCK_FUNCTION (block)) break; -Index: gdb-7.9.90.20150709/gdb/typeprint.c +Index: gdb-7.10.50.20151027/gdb/typeprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/typeprint.c 2015-07-09 18:24:39.013356264 +0200 -+++ gdb-7.9.90.20150709/gdb/typeprint.c 2015-07-09 18:24:42.257383936 +0200 -@@ -404,7 +404,7 @@ whatis_exp (char *exp, int show) +--- gdb-7.10.50.20151027.orig/gdb/typeprint.c 2015-11-02 21:23:11.234351798 +0100 ++++ gdb-7.10.50.20151027/gdb/typeprint.c 2015-11-02 21:23:13.236364971 +0100 +@@ -406,7 +406,7 @@ whatis_exp (char *exp, int show) struct type *real_type = NULL; struct type *type; int full = 0; @@ -3237,37 +3230,27 @@ Index: gdb-7.9.90.20150709/gdb/typeprint.c int using_enc = 0; struct value_print_options opts; struct type_print_options flags = default_ptype_flags; -Index: gdb-7.9.90.20150709/gdb/valarith.c +Index: gdb-7.10.50.20151027/gdb/valarith.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/valarith.c 2015-07-09 18:24:39.014356273 +0200 -+++ gdb-7.9.90.20150709/gdb/valarith.c 2015-07-09 18:24:42.257383936 +0200 -@@ -188,12 +188,13 @@ value_subscript (struct value *array, LO +--- gdb-7.10.50.20151027.orig/gdb/valarith.c 2015-11-02 21:23:11.234351798 +0100 ++++ gdb-7.10.50.20151027/gdb/valarith.c 2015-11-02 21:23:59.822671496 +0100 +@@ -188,12 +188,12 @@ value_subscript (struct value *array, LO to doubles, but no longer does. */ struct value * -value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound) -+value_subscripted_rvalue (struct value *array, LONGEST index, -+ LONGEST lowerbound) ++value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound) { 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); +- unsigned int elt_size = type_length_units (elt_type); - unsigned int elt_offs; -+ ULONGEST elt_size = TYPE_LENGTH (elt_type); ++ ULONGEST elt_size = type_length_units (elt_type); + ULONGEST elt_offs; LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)); struct value *v; -@@ -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); -+ elt_offs = index - lowerbound; - - if (elt_stride > 0) - elt_offs *= elt_stride; -@@ -678,7 +679,7 @@ value_concat (struct value *arg1, struct +@@ -678,7 +678,7 @@ value_concat (struct value *arg1, struct struct value *inval1; struct value *inval2; struct value *outval = NULL; @@ -3276,7 +3259,7 @@ Index: gdb-7.9.90.20150709/gdb/valarith.c int count, idx; char *ptr; char inchar; -@@ -1531,7 +1532,7 @@ value_binop (struct value *arg1, struct +@@ -1531,7 +1531,7 @@ value_binop (struct value *arg1, struct int value_logical_not (struct value *arg1) { @@ -3285,7 +3268,7 @@ Index: gdb-7.9.90.20150709/gdb/valarith.c const gdb_byte *p; struct type *type1; -@@ -1562,11 +1563,11 @@ value_logical_not (struct value *arg1) +@@ -1562,11 +1562,11 @@ value_logical_not (struct value *arg1) static int value_strcmp (struct value *arg1, struct value *arg2) { @@ -3300,10 +3283,10 @@ Index: gdb-7.9.90.20150709/gdb/valarith.c for (i = 0; i < len; i++) { -Index: gdb-7.9.90.20150709/gdb/valops.c +Index: gdb-7.10.50.20151027/gdb/valops.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/valops.c 2015-07-09 18:24:39.019356316 +0200 -+++ gdb-7.9.90.20150709/gdb/valops.c 2015-07-09 18:26:02.032064420 +0200 +--- gdb-7.10.50.20151027.orig/gdb/valops.c 2015-11-02 21:23:11.240351838 +0100 ++++ gdb-7.10.50.20151027/gdb/valops.c 2015-11-02 21:23:13.238364984 +0100 @@ -51,7 +51,7 @@ static struct value *search_struct_field static struct value *search_struct_method (const char *, struct value **, @@ -3425,7 +3408,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { -@@ -1054,7 +1056,7 @@ value_assign (struct value *toval, struc +@@ -1057,7 +1059,7 @@ value_assign (struct value *toval, struc { const gdb_byte *dest_buffer; CORE_ADDR changed_addr; @@ -3434,7 +3417,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c gdb_byte buffer[sizeof (LONGEST)]; if (value_bitsize (toval)) -@@ -1123,7 +1125,7 @@ value_assign (struct value *toval, struc +@@ -1126,7 +1128,7 @@ value_assign (struct value *toval, struc if (value_bitsize (toval)) { struct value *parent = value_parent (toval); @@ -3443,7 +3426,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c int changed_len; gdb_byte buffer[sizeof (LONGEST)]; int optim, unavail; -@@ -1604,7 +1606,7 @@ value_array (int lowbound, int highbound +@@ -1590,7 +1592,7 @@ value_array (int lowbound, int highbound { int nelem; int idx; @@ -3452,7 +3435,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c struct value *val; struct type *arraytype; -@@ -1779,7 +1781,7 @@ typecmp (int staticp, int varargs, int n +@@ -1766,7 +1768,7 @@ typecmp (int staticp, int varargs, int n static void update_search_result (struct value **result_ptr, struct value *v, @@ -3461,7 +3444,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c const char *name, struct type *type) { if (v != NULL) -@@ -1803,10 +1805,10 @@ update_search_result (struct value **res +@@ -1790,10 +1792,10 @@ update_search_result (struct value **res lookup is ambiguous. */ static void @@ -3474,7 +3457,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c struct type *outermost_type) { int i; -@@ -1853,7 +1855,7 @@ do_search_struct_field (const char *name +@@ -1840,7 +1842,7 @@ do_search_struct_field (const char *name . */ struct value *v = NULL; @@ -3483,7 +3466,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c /* This is pretty gross. In G++, the offset in an anonymous union is relative to the beginning of the -@@ -1892,7 +1894,7 @@ do_search_struct_field (const char *name +@@ -1879,7 +1881,7 @@ do_search_struct_field (const char *name && (strcmp_iw (name, TYPE_BASECLASS_NAME (type, i)) == 0)); @@ -3492,7 +3475,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -1968,7 +1970,7 @@ search_struct_field (const char *name, s +@@ -1955,7 +1957,7 @@ search_struct_field (const char *name, s struct type *type, int looking_for_baseclass) { struct value *result = NULL; @@ -3501,7 +3484,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c do_search_struct_field (name, arg1, 0, type, looking_for_baseclass, &result, &boffset, type); -@@ -1985,7 +1987,7 @@ search_struct_field (const char *name, s +@@ -1972,7 +1974,7 @@ search_struct_field (const char *name, s static struct value * search_struct_method (const char *name, struct value **arg1p, @@ -3510,7 +3493,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c int *static_memfuncp, struct type *type) { int i; -@@ -2049,8 +2051,8 @@ search_struct_method (const char *name, +@@ -2036,8 +2038,8 @@ search_struct_method (const char *name, for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3521,7 +3504,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2285,10 +2287,10 @@ value_struct_elt_bitpos (struct value ** +@@ -2272,10 +2274,10 @@ value_struct_elt_bitpos (struct value ** static void find_method_list (struct value **argp, const char *method, @@ -3534,7 +3517,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c { int i; struct fn_field *f = NULL; -@@ -2345,7 +2347,7 @@ find_method_list (struct value **argp, c +@@ -2332,7 +2334,7 @@ find_method_list (struct value **argp, c extension methods. */ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) { @@ -3543,7 +3526,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (type, i)) { -@@ -2388,7 +2390,7 @@ value_find_oload_method_list (struct val +@@ -2375,7 +2377,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, @@ -3552,7 +3535,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c { struct type *t; -@@ -2499,7 +2501,7 @@ find_overload_match (struct value **args +@@ -2486,7 +2488,7 @@ find_overload_match (struct value **args /* Number of overloaded instances being considered. */ int num_fns = 0; struct type *basetype = NULL; @@ -3561,7 +3544,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL); -@@ -3314,7 +3316,7 @@ compare_parameters (struct type *t1, str +@@ -3300,7 +3302,7 @@ compare_parameters (struct type *t1, str the form "DOMAIN::NAME". */ static struct value * @@ -3570,7 +3553,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c struct type *curtype, const char *name, struct type *intype, int want_address, -@@ -3348,7 +3350,7 @@ value_struct_elt_for_reference (struct t +@@ -3334,7 +3336,7 @@ value_struct_elt_for_reference (struct t if (want_address) return value_from_longest (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain), @@ -3579,7 +3562,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c else if (noside != EVAL_NORMAL) return allocate_value (TYPE_FIELD_TYPE (t, i)); else -@@ -3516,7 +3518,7 @@ value_struct_elt_for_reference (struct t +@@ -3502,7 +3504,7 @@ value_struct_elt_for_reference (struct t for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--) { struct value *v; @@ -3588,7 +3571,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c if (BASETYPE_VIA_VIRTUAL (t, i)) base_offset = 0; -@@ -3597,7 +3599,7 @@ value_maybe_namespace_elt (const struct +@@ -3583,7 +3585,7 @@ value_maybe_namespace_elt (const struct struct type * value_rtti_indirect_type (struct value *v, int *full, @@ -3597,7 +3580,7 @@ Index: gdb-7.9.90.20150709/gdb/valops.c { struct value *target = NULL; struct type *type, *real_type, *target_type; -@@ -3665,12 +3667,12 @@ value_rtti_indirect_type (struct value * +@@ -3651,12 +3653,12 @@ value_rtti_indirect_type (struct value * struct value * value_full_object (struct value *argp, struct type *rtype, @@ -3612,11 +3595,11 @@ Index: gdb-7.9.90.20150709/gdb/valops.c int using_enc = 0; struct value *new_val; -Index: gdb-7.9.90.20150709/gdb/valprint.c +Index: gdb-7.10.50.20151027/gdb/valprint.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/valprint.c 2015-07-09 18:24:39.020356324 +0200 -+++ gdb-7.9.90.20150709/gdb/valprint.c 2015-07-09 18:24:42.260383962 +0200 -@@ -298,7 +298,7 @@ val_print_scalar_type_p (struct type *ty +--- gdb-7.10.50.20151027.orig/gdb/valprint.c 2015-11-02 21:23:11.242351851 +0100 ++++ gdb-7.10.50.20151027/gdb/valprint.c 2015-11-02 21:23:13.239364991 +0100 +@@ -299,7 +299,7 @@ val_print_scalar_type_p (struct type *ty int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -3624,8 +3607,8 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c + LONGEST embedded_offset, const struct value *val) { - CHECK_TYPEDEF (type); -@@ -396,7 +396,7 @@ val_print_not_associated (struct ui_file + type = check_typedef (type); +@@ -834,7 +834,7 @@ generic_val_print_complex (struct type * void generic_val_print (struct type *type, const gdb_byte *valaddr, @@ -3634,7 +3617,7 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, -@@ -758,7 +758,7 @@ generic_val_print (struct type *type, co +@@ -969,7 +969,7 @@ generic_val_print (struct type *type, co RECURSE. */ void @@ -3643,7 +3626,7 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -998,7 +998,7 @@ val_print_type_code_flags (struct type * +@@ -1221,7 +1221,7 @@ val_print_type_code_flags (struct type * void val_print_scalar_formatted (struct type *type, @@ -3652,7 +3635,7 @@ Index: gdb-7.9.90.20150709/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 +@@ -1766,7 +1766,7 @@ print_decimal_chars (struct ui_file *str void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3661,7 +3644,7 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c { const gdb_byte *p; -@@ -1657,22 +1657,22 @@ maybe_print_array_index (struct type *in +@@ -1883,22 +1883,22 @@ maybe_print_array_index (struct type *in void val_print_array_elements (struct type *type, @@ -3690,7 +3673,7 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c LONGEST low_bound, high_bound; LONGEST low_pos, high_pos; -@@ -1762,7 +1762,7 @@ val_print_array_elements (struct type *t +@@ -1988,7 +1988,7 @@ val_print_array_elements (struct type *t address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3699,7 +3682,7 @@ Index: gdb-7.9.90.20150709/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2418,7 +2418,7 @@ print_converted_chars_to_obstack (struct +@@ -2644,7 +2644,7 @@ print_converted_chars_to_obstack (struct void generic_printstr (struct ui_file *stream, struct type *type, @@ -3708,10 +3691,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/valprint.h +Index: gdb-7.10.50.20151027/gdb/valprint.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/valprint.h 2015-07-09 18:24:39.021356333 +0200 -+++ gdb-7.9.90.20150709/gdb/valprint.h 2015-07-09 18:24:42.260383962 +0200 +--- gdb-7.10.50.20151027.orig/gdb/valprint.h 2015-11-02 21:23:11.242351851 +0100 ++++ gdb-7.10.50.20151027/gdb/valprint.h 2015-11-02 21:23:13.239364991 +0100 @@ -115,11 +115,11 @@ extern void maybe_print_array_index (str struct ui_file *stream, const struct value_print_options *); @@ -3762,10 +3745,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/value.c +Index: gdb-7.10.50.20151027/gdb/value.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/value.c 2015-07-09 18:24:39.026356375 +0200 -+++ gdb-7.9.90.20150709/gdb/value.c 2015-07-09 18:24:42.261383970 +0200 +--- gdb-7.10.50.20151027.orig/gdb/value.c 2015-11-02 21:23:11.248351890 +0100 ++++ gdb-7.10.50.20151027/gdb/value.c 2015-11-02 21:23:13.241365004 +0100 @@ -66,10 +66,10 @@ struct internal_function struct range { @@ -3800,9 +3783,9 @@ Index: gdb-7.9.90.20150709/gdb/value.c range_s what; int i; @@ -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. */ + the address. If lval == lval_register, this is a further offset from + location.address within the registers structure. Note also the member + embedded_offset below. */ - int offset; + LONGEST offset; @@ -3819,8 +3802,8 @@ Index: gdb-7.9.90.20150709/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 -@@ -342,7 +342,7 @@ struct value - }; +@@ -350,7 +350,7 @@ get_value_arch (const struct value *valu + } int -value_bits_available (const struct value *value, int offset, int length) @@ -3828,7 +3811,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { gdb_assert (!value->lazy); -@@ -350,7 +350,8 @@ value_bits_available (const struct value +@@ -358,7 +358,8 @@ value_bits_available (const struct value } int @@ -3838,7 +3821,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { return value_bits_available (value, offset * TARGET_CHAR_BIT, -@@ -358,7 +359,8 @@ value_bytes_available (const struct valu +@@ -366,7 +367,8 @@ value_bytes_available (const struct valu } int @@ -3848,7 +3831,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { gdb_assert (!value->lazy); -@@ -420,7 +422,8 @@ value_entirely_optimized_out (struct val +@@ -428,7 +430,8 @@ value_entirely_optimized_out (struct val OFFSET bits, and extending for the next LENGTH bits. */ static void @@ -3858,7 +3841,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { range_s newr; int i; -@@ -591,7 +594,8 @@ mark_value_bits_unavailable (struct valu +@@ -599,7 +602,8 @@ mark_value_bits_unavailable (struct valu } void @@ -3868,7 +3851,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { mark_value_bits_unavailable (value, offset * TARGET_CHAR_BIT, -@@ -605,7 +609,7 @@ mark_value_bytes_unavailable (struct val +@@ -613,7 +617,7 @@ mark_value_bytes_unavailable (struct val static int find_first_range_overlap (VEC(range_s) *ranges, int pos, @@ -3877,7 +3860,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { range_s *r; int i; -@@ -801,9 +805,9 @@ find_first_range_overlap_and_match (stru +@@ -809,9 +813,9 @@ find_first_range_overlap_and_match (stru Return true if the available bits match. */ static int @@ -3890,7 +3873,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { /* 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 +@@ -871,9 +875,9 @@ value_contents_bits_eq (const struct val } int @@ -3903,7 +3886,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { 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 +@@ -1037,13 +1041,13 @@ deprecated_set_value_type (struct value value->type = type; } @@ -3919,7 +3902,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { value->offset = offset; } -@@ -1246,8 +1250,9 @@ value_ranges_copy_adjusted (struct value +@@ -1257,8 +1261,9 @@ value_ranges_copy_adjusted (struct value DST_OFFSET+LENGTH) range are wholly available. */ void @@ -3930,8 +3913,8 @@ Index: gdb-7.9.90.20150709/gdb/value.c + ssize_t length) { range_s *r; - int i; -@@ -1293,8 +1298,8 @@ value_contents_copy_raw (struct value *d + int src_bit_offset, dst_bit_offset, bit_length; +@@ -1305,8 +1310,8 @@ value_contents_copy_raw (struct value *d DST_OFFSET+LENGTH) range are wholly available. */ void @@ -3942,7 +3925,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { if (src->lazy) value_fetch_lazy (src); -@@ -1358,7 +1363,8 @@ value_optimized_out (struct value *value +@@ -1370,7 +1375,8 @@ value_optimized_out (struct value *value the following LENGTH bytes. */ void @@ -3952,7 +3935,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { mark_value_bits_optimized_out (value, offset * TARGET_CHAR_BIT, -@@ -1368,14 +1374,15 @@ mark_value_bytes_optimized_out (struct v +@@ -1380,14 +1386,15 @@ mark_value_bytes_optimized_out (struct v /* See value.h. */ void @@ -3970,7 +3953,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { if (value->lval != lval_computed || !value->location.computed.funcs->check_synthetic_pointer) -@@ -1385,26 +1392,26 @@ value_bits_synthetic_pointer (const stru +@@ -1397,26 +1404,26 @@ value_bits_synthetic_pointer (const stru length); } @@ -4001,7 +3984,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { value->pointed_to_offset = val; } -@@ -2287,7 +2294,7 @@ get_internalvar_function (struct interna +@@ -2295,7 +2302,7 @@ get_internalvar_function (struct interna } void @@ -4010,7 +3993,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c int bitsize, struct value *newval) { gdb_byte *addr; -@@ -3008,7 +3015,7 @@ set_value_enclosing_type (struct value * +@@ -3020,7 +3027,7 @@ set_value_enclosing_type (struct value * FIELDNO says which field. */ struct value * @@ -4019,7 +4002,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c int fieldno, struct type *arg_type) { struct value *v; -@@ -3058,7 +3065,7 @@ value_primitive_field (struct value *arg +@@ -3072,7 +3079,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. */ @@ -4028,7 +4011,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c /* Lazy register values with offsets are not supported. */ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) -@@ -3144,7 +3151,7 @@ value_field (struct value *arg1, int fie +@@ -3159,7 +3166,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, @@ -4037,7 +4020,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); -@@ -3214,14 +3221,14 @@ value_fn_field (struct value **arg1p, st +@@ -3229,14 +3236,14 @@ value_fn_field (struct value **arg1p, st static LONGEST unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr, @@ -4054,7 +4037,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c /* Read the minimum number of bytes required; there may not be enough bytes to read an entire ULONGEST. */ -@@ -3270,7 +3277,7 @@ unpack_bits_as_long (struct type *field_ +@@ -3285,7 +3292,7 @@ unpack_bits_as_long (struct type *field_ int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, @@ -4063,7 +4046,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c const struct value *val, LONGEST *result) { int bitpos = TYPE_FIELD_BITPOS (type, fieldno); -@@ -3314,7 +3321,7 @@ unpack_field_as_long (struct type *type, +@@ -3329,7 +3336,7 @@ unpack_field_as_long (struct type *type, void unpack_value_bitfield (struct value *dest_val, int bitpos, int bitsize, @@ -4072,7 +4055,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c const struct value *val) { enum bfd_endian byte_order; -@@ -3352,7 +3359,7 @@ unpack_value_bitfield (struct value *des +@@ -3367,7 +3374,7 @@ unpack_value_bitfield (struct value *des struct value * value_field_bitfield (struct type *type, int fieldno, const gdb_byte *valaddr, @@ -4081,7 +4064,7 @@ Index: gdb-7.9.90.20150709/gdb/value.c { int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); -@@ -3373,12 +3380,12 @@ value_field_bitfield (struct type *type, +@@ -3388,12 +3395,12 @@ value_field_bitfield (struct type *type, void modify_field (struct type *type, gdb_byte *addr, @@ -4096,11 +4079,11 @@ Index: gdb-7.9.90.20150709/gdb/value.c /* Normalize BITPOS. */ addr += bitpos / 8; -Index: gdb-7.9.90.20150709/gdb/value.h +Index: gdb-7.10.50.20151027/gdb/value.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/value.h 2015-07-09 18:24:39.027356384 +0200 -+++ gdb-7.9.90.20150709/gdb/value.h 2015-07-09 18:24:42.262383979 +0200 -@@ -131,8 +131,8 @@ extern void set_value_parent (struct val +--- gdb-7.10.50.20151027.orig/gdb/value.h 2015-11-02 21:23:11.250351904 +0100 ++++ gdb-7.10.50.20151027/gdb/value.h 2015-11-02 21:23:13.241365004 +0100 +@@ -135,8 +135,8 @@ extern void set_value_parent (struct val within the registers structure. Note also the member embedded_offset below. */ @@ -4111,7 +4094,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* The comment from "struct value" reads: ``Is it modifiable? Only relevant if lval != not_lval.''. Shouldn't the value instead be -@@ -201,10 +201,10 @@ extern struct type *value_actual_type (s +@@ -205,10 +205,10 @@ extern struct type *value_actual_type (s int resolve_simple_types, int *real_type_found); @@ -4126,7 +4109,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* For lval_computed values, this structure holds functions used to retrieve and set the value (or portions of the value). -@@ -242,7 +242,7 @@ struct lval_funcs +@@ -246,7 +246,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, @@ -4135,7 +4118,7 @@ Index: gdb-7.9.90.20150709/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 -@@ -279,7 +279,7 @@ extern struct value *allocate_computed_v +@@ -283,7 +283,7 @@ extern struct value *allocate_computed_v Otherwise, return 1. */ extern int valprint_check_validity (struct ui_file *stream, struct type *type, @@ -4144,7 +4127,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h const struct value *val); extern struct value *allocate_optimized_out_value (struct type *type); -@@ -373,7 +373,8 @@ extern int value_optimized_out (struct v +@@ -377,7 +377,8 @@ extern int value_optimized_out (struct v otherwise. */ extern int value_bits_any_optimized_out (const struct value *value, @@ -4154,7 +4137,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* Like value_optimized_out, but return true iff the whole value is optimized out. */ -@@ -383,13 +384,13 @@ extern int value_entirely_optimized_out +@@ -387,13 +388,13 @@ extern int value_entirely_optimized_out LENGTH bytes as optimized out. */ extern void mark_value_bytes_optimized_out (struct value *value, @@ -4170,7 +4153,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* 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 +@@ -476,7 +477,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, @@ -4179,7 +4162,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* Given a value, determine whether the contents bytes starting at OFFSET and extending for LENGTH bytes are available. This returns -@@ -480,7 +481,7 @@ extern int value_bits_synthetic_pointer +@@ -484,7 +485,7 @@ extern int value_bits_synthetic_pointer byte is unavailable. */ extern int value_bytes_available (const struct value *value, @@ -4188,7 +4171,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* Given a value, determine whether the contents bits starting at OFFSET and extending for LENGTH bits are available. This returns -@@ -488,7 +489,7 @@ extern int value_bytes_available (const +@@ -492,7 +493,7 @@ extern int value_bytes_available (const bit is unavailable. */ extern int value_bits_available (const struct value *value, @@ -4197,7 +4180,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* 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 +@@ -506,7 +507,7 @@ extern int value_entirely_unavailable (s LENGTH bytes as unavailable. */ extern void mark_value_bytes_unavailable (struct value *value, @@ -4206,7 +4189,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* Mark VALUE's content bits starting at OFFSET and extending for LENGTH bits as unavailable. */ -@@ -563,9 +564,9 @@ extern void mark_value_bits_unavailable +@@ -567,9 +568,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. */ @@ -4217,9 +4200,9 @@ Index: gdb-7.9.90.20150709/gdb/value.h + 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 -@@ -574,7 +575,7 @@ extern int value_contents_eq (const stru + /* Read LENGTH addressable memory units starting at MEMADDR into BUFFER, + which is (or will be copied to) VAL's contents buffer offset by +@@ -578,7 +579,7 @@ extern int value_contents_eq (const stru memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ @@ -4228,7 +4211,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); -@@ -610,17 +611,18 @@ extern LONGEST unpack_field_as_long (str +@@ -614,17 +615,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, @@ -4250,7 +4233,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h const struct value *val); extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); -@@ -677,12 +679,12 @@ extern struct value *default_read_var_va +@@ -683,12 +685,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); @@ -4269,7 +4252,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h extern struct value *allocate_repeat_value (struct type *type, int count); -@@ -760,16 +762,16 @@ extern int find_overload_match (struct v +@@ -766,16 +768,16 @@ extern int find_overload_match (struct v extern struct value *value_field (struct value *arg1, int fieldno); @@ -4289,7 +4272,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -864,7 +866,7 @@ extern void set_internalvar_string (stru +@@ -870,7 +872,7 @@ extern void set_internalvar_string (stru extern void clear_internalvar (struct internalvar *var); extern void set_internalvar_component (struct internalvar *var, @@ -4298,7 +4281,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h int bitpos, int bitsize, struct value *newvalue); -@@ -945,7 +947,7 @@ extern struct value *value_x_unop (struc +@@ -951,7 +953,7 @@ extern struct value *value_x_unop (struc enum noside noside); extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f, @@ -4307,7 +4290,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h extern int binop_types_user_defined_p (enum exp_opcode op, struct type *type1, -@@ -973,7 +975,8 @@ extern void release_value_or_incref (str +@@ -979,7 +981,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, @@ -4317,7 +4300,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h extern void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show); -@@ -1003,7 +1006,7 @@ extern void value_print_array_elements ( +@@ -1009,7 +1012,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, @@ -4326,7 +4309,7 @@ Index: gdb-7.9.90.20150709/gdb/value.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -@@ -1056,10 +1059,11 @@ extern struct value *value_literal_compl +@@ -1062,10 +1065,11 @@ extern struct value *value_literal_compl extern struct value *find_function_in_inferior (const char *, struct objfile **); @@ -4340,10 +4323,10 @@ Index: gdb-7.9.90.20150709/gdb/value.h /* User function handler. */ -Index: gdb-7.9.90.20150709/gdb/s390-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/s390-linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/s390-linux-nat.c 2015-07-09 18:24:39.028356393 +0200 -+++ gdb-7.9.90.20150709/gdb/s390-linux-nat.c 2015-07-09 18:24:42.262383979 +0200 +--- gdb-7.10.50.20151027.orig/gdb/s390-linux-nat.c 2015-11-02 21:23:11.250351904 +0100 ++++ gdb-7.10.50.20151027/gdb/s390-linux-nat.c 2015-11-02 21:23:13.242365010 +0100 @@ -612,7 +612,7 @@ s390_can_use_hw_breakpoint (struct targe static int @@ -4353,11 +4336,11 @@ Index: gdb-7.9.90.20150709/gdb/s390-linux-nat.c { return 1; } -Index: gdb-7.9.90.20150709/gdb/extension-priv.h +Index: gdb-7.10.50.20151027/gdb/extension-priv.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/extension-priv.h 2015-07-09 18:24:39.028356393 +0200 -+++ gdb-7.9.90.20150709/gdb/extension-priv.h 2015-07-09 18:24:42.262383979 +0200 -@@ -180,7 +180,7 @@ struct extension_language_ops +--- gdb-7.10.50.20151027.orig/gdb/extension-priv.h 2015-11-02 21:23:11.250351904 +0100 ++++ gdb-7.10.50.20151027/gdb/extension-priv.h 2015-11-02 21:23:13.242365010 +0100 +@@ -181,7 +181,7 @@ struct extension_language_ops enum ext_lang_rc (*apply_val_pretty_printer) (const struct extension_language_defn *, struct type *type, const gdb_byte *valaddr, @@ -4366,10 +4349,10 @@ Index: gdb-7.9.90.20150709/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.9.90.20150709/gdb/python/python-internal.h +Index: gdb-7.10.50.20151027/gdb/python/python-internal.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/python/python-internal.h 2015-07-09 18:24:39.028356393 +0200 -+++ gdb-7.9.90.20150709/gdb/python/python-internal.h 2015-07-09 18:24:42.263383988 +0200 +--- gdb-7.10.50.20151027.orig/gdb/python/python-internal.h 2015-11-02 21:23:11.250351904 +0100 ++++ gdb-7.10.50.20151027/gdb/python/python-internal.h 2015-11-02 21:23:13.242365010 +0100 @@ -316,7 +316,7 @@ extern int gdbpy_auto_load_enabled (cons extern enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *, @@ -4379,11 +4362,11 @@ Index: gdb-7.9.90.20150709/gdb/python/python-internal.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.9.90.20150709/gdb/target-delegates.c +Index: gdb-7.10.50.20151027/gdb/target-delegates.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/target-delegates.c 2015-07-09 18:24:39.029356401 +0200 -+++ gdb-7.9.90.20150709/gdb/target-delegates.c 2015-07-09 18:24:42.264383996 +0200 -@@ -742,14 +742,14 @@ debug_watchpoint_addr_within_range (stru +--- gdb-7.10.50.20151027.orig/gdb/target-delegates.c 2015-11-02 21:23:11.252351917 +0100 ++++ gdb-7.10.50.20151027/gdb/target-delegates.c 2015-11-02 21:23:13.243365017 +0100 +@@ -736,14 +736,14 @@ debug_watchpoint_addr_within_range (stru } static int @@ -4400,7 +4383,7 @@ Index: gdb-7.9.90.20150709/gdb/target-delegates.c { int result; fprintf_unfiltered (gdb_stdlog, "-> %s->to_region_ok_for_hw_watchpoint (...)\n", debug_target.to_shortname); -@@ -759,7 +759,7 @@ debug_region_ok_for_hw_watchpoint (struc +@@ -753,7 +753,7 @@ debug_region_ok_for_hw_watchpoint (struc fputs_unfiltered (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); fputs_unfiltered (", ", gdb_stdlog); @@ -4409,23 +4392,23 @@ Index: gdb-7.9.90.20150709/gdb/target-delegates.c fputs_unfiltered (") = ", gdb_stdlog); target_debug_print_int (result); fputs_unfiltered ("\n", gdb_stdlog); -Index: gdb-7.9.90.20150709/gdb/aarch64-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/aarch64-linux-nat.c 2015-07-09 18:24:39.030356410 +0200 -+++ gdb-7.9.90.20150709/gdb/aarch64-linux-nat.c 2015-07-09 18:24:42.264383996 +0200 -@@ -1386,7 +1386,7 @@ aarch64_linux_remove_watchpoint (struct +--- gdb-7.10.50.20151027.orig/gdb/aarch64-linux-nat.c 2015-11-02 21:23:11.252351917 +0100 ++++ gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c 2015-11-02 21:23:13.243365017 +0100 +@@ -736,7 +736,7 @@ aarch64_linux_remove_watchpoint (struct static int aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self, - CORE_ADDR addr, int len) + CORE_ADDR addr, LONGEST len) { - CORE_ADDR aligned_addr; - -Index: gdb-7.9.90.20150709/gdb/nat/x86-dregs.c + return aarch64_linux_region_ok_for_watchpoint (addr, len); + } +Index: gdb-7.10.50.20151027/gdb/nat/x86-dregs.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/nat/x86-dregs.c 2015-07-09 18:24:39.030356410 +0200 -+++ gdb-7.9.90.20150709/gdb/nat/x86-dregs.c 2015-07-09 18:24:42.264383996 +0200 +--- gdb-7.10.50.20151027.orig/gdb/nat/x86-dregs.c 2015-11-02 21:23:11.252351917 +0100 ++++ gdb-7.10.50.20151027/gdb/nat/x86-dregs.c 2015-11-02 21:23:13.244365024 +0100 @@ -384,7 +384,7 @@ x86_remove_aligned_watchpoint (struct x8 static int @@ -4444,10 +4427,10 @@ Index: gdb-7.9.90.20150709/gdb/nat/x86-dregs.c { int nregs; -Index: gdb-7.9.90.20150709/gdb/compile/compile-c-support.c +Index: gdb-7.10.50.20151027/gdb/compile/compile-c-support.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/compile/compile-c-support.c 2015-07-09 18:24:39.030356410 +0200 -+++ gdb-7.9.90.20150709/gdb/compile/compile-c-support.c 2015-07-09 18:24:42.265384005 +0200 +--- gdb-7.10.50.20151027.orig/gdb/compile/compile-c-support.c 2015-11-02 21:23:11.253351923 +0100 ++++ gdb-7.10.50.20151027/gdb/compile/compile-c-support.c 2015-11-02 21:23:13.244365024 +0100 @@ -299,11 +299,11 @@ generate_register_struct (struct ui_file default: @@ -4462,10 +4445,10 @@ Index: gdb-7.9.90.20150709/gdb/compile/compile-c-support.c } fputs_unfiltered (";\n", stream); -Index: gdb-7.9.90.20150709/gdb/nat/x86-dregs.h +Index: gdb-7.10.50.20151027/gdb/nat/x86-dregs.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/nat/x86-dregs.h 2015-07-09 18:24:39.030356410 +0200 -+++ gdb-7.9.90.20150709/gdb/nat/x86-dregs.h 2015-07-09 18:24:42.265384005 +0200 +--- gdb-7.10.50.20151027.orig/gdb/nat/x86-dregs.h 2015-11-02 21:23:11.253351923 +0100 ++++ gdb-7.10.50.20151027/gdb/nat/x86-dregs.h 2015-11-02 21:23:13.244365024 +0100 @@ -116,7 +116,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. */ @@ -4475,11 +4458,11 @@ Index: gdb-7.9.90.20150709/gdb/nat/x86-dregs.h /* If the inferior has some break/watchpoint that triggered, set the address associated with that break/watchpoint and return true. -Index: gdb-7.9.90.20150709/gdb/x86-nat.c +Index: gdb-7.10.50.20151027/gdb/x86-nat.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/x86-nat.c 2015-07-09 18:24:39.031356418 +0200 -+++ gdb-7.9.90.20150709/gdb/x86-nat.c 2015-07-09 18:24:42.265384005 +0200 -@@ -178,7 +178,7 @@ x86_remove_watchpoint (struct target_ops +--- gdb-7.10.50.20151027.orig/gdb/x86-nat.c 2015-11-02 21:23:11.253351923 +0100 ++++ gdb-7.10.50.20151027/gdb/x86-nat.c 2015-11-02 21:23:13.244365024 +0100 +@@ -174,7 +174,7 @@ x86_remove_watchpoint (struct target_ops static int x86_region_ok_for_watchpoint (struct target_ops *self, @@ -4488,11 +4471,11 @@ Index: gdb-7.9.90.20150709/gdb/x86-nat.c { struct x86_debug_reg_state *state = x86_debug_reg_state (ptid_get_pid (inferior_ptid)); -Index: gdb-7.9.90.20150709/gdb/guile/guile-internal.h +Index: gdb-7.10.50.20151027/gdb/guile/guile-internal.h =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/guile/guile-internal.h 2015-07-09 18:24:39.031356418 +0200 -+++ gdb-7.9.90.20150709/gdb/guile/guile-internal.h 2015-07-09 18:24:42.265384005 +0200 -@@ -562,7 +562,7 @@ extern void gdbscm_preserve_values +--- gdb-7.10.50.20151027.orig/gdb/guile/guile-internal.h 2015-11-02 21:23:11.253351923 +0100 ++++ gdb-7.10.50.20151027/gdb/guile/guile-internal.h 2015-11-02 21:23:13.244365024 +0100 +@@ -606,7 +606,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, @@ -4501,10 +4484,10 @@ Index: gdb-7.9.90.20150709/gdb/guile/guile-internal.h struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, -Index: gdb-7.9.90.20150709/gdb/guile/scm-pretty-print.c +Index: gdb-7.10.50.20151027/gdb/guile/scm-pretty-print.c =================================================================== ---- gdb-7.9.90.20150709.orig/gdb/guile/scm-pretty-print.c 2015-07-09 18:24:39.031356418 +0200 -+++ gdb-7.9.90.20150709/gdb/guile/scm-pretty-print.c 2015-07-09 18:24:42.266384013 +0200 +--- gdb-7.10.50.20151027.orig/gdb/guile/scm-pretty-print.c 2015-11-02 21:23:11.254351930 +0100 ++++ gdb-7.10.50.20151027/gdb/guile/scm-pretty-print.c 2015-11-02 21:23:13.245365030 +0100 @@ -958,7 +958,7 @@ ppscm_print_children (SCM printer, enum enum ext_lang_rc gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang, diff --git a/SOURCES/gdb-rhbz795424-bitpos-21of25.patch b/SOURCES/gdb-rhbz795424-bitpos-21of25.patch index 9ca0010..0fa7ead 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-21of25.patch +++ b/SOURCES/gdb-rhbz795424-bitpos-21of25.patch @@ -52,11 +52,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch -Index: gdb-7.7.90.20140613/gdb/alpha-tdep.c +Index: gdb-7.10.90.20160211/gdb/alpha-tdep.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/alpha-tdep.c 2014-06-13 22:14:49.725846383 +0200 -+++ gdb-7.7.90.20140613/gdb/alpha-tdep.c 2014-06-13 22:14:53.163850081 +0200 -@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *g +--- gdb-7.10.90.20160211.orig/gdb/alpha-tdep.c 2016-02-11 20:56:59.224850729 +0100 ++++ gdb-7.10.90.20160211/gdb/alpha-tdep.c 2016-02-11 20:57:05.385891225 +0100 +@@ -413,6 +413,13 @@ accumulate_size = 0; else accumulate_size -= sizeof(arg_reg_buffer); @@ -70,24 +70,24 @@ Index: gdb-7.7.90.20140613/gdb/alpha-tdep.c sp -= accumulate_size; /* Keep sp aligned to a multiple of 16 as the ABI requires. */ -Index: gdb-7.7.90.20140613/gdb/cp-valprint.c +Index: gdb-7.10.90.20160211/gdb/cp-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/cp-valprint.c 2014-06-13 22:14:49.725846383 +0200 -+++ gdb-7.7.90.20140613/gdb/cp-valprint.c 2014-06-13 22:14:53.164850081 +0200 -@@ -538,6 +538,8 @@ cp_print_value (struct type *type, struc +--- gdb-7.10.90.20160211.orig/gdb/cp-valprint.c 2016-02-11 20:56:59.224850729 +0100 ++++ gdb-7.10.90.20160211/gdb/cp-valprint.c 2016-02-11 20:57:05.385891225 +0100 +@@ -536,6 +536,8 @@ gdb_byte *buf; struct cleanup *back_to; + ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); + - buf = xmalloc (TYPE_LENGTH (baseclass)); + buf = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, buf); -Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c +Index: gdb-7.10.90.20160211/gdb/dwarf2loc.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/dwarf2loc.c 2014-06-13 22:14:49.726846384 +0200 -+++ gdb-7.7.90.20140613/gdb/dwarf2loc.c 2014-06-13 22:14:53.166850084 +0200 -@@ -1666,6 +1666,8 @@ read_pieced_value (struct value *v) +--- gdb-7.10.90.20160211.orig/gdb/dwarf2loc.c 2016-02-11 20:56:59.225850736 +0100 ++++ gdb-7.10.90.20160211/gdb/dwarf2loc.c 2016-02-11 20:57:05.386891231 +0100 +@@ -1744,6 +1744,8 @@ this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8; source_offset = source_offset_bits / 8; @@ -96,7 +96,7 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c if (buffer_size < this_size) { buffer_size = this_size; -@@ -1857,6 +1859,7 @@ write_pieced_value (struct value *to, st +@@ -1926,6 +1928,7 @@ } else { @@ -104,35 +104,35 @@ Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c if (buffer_size < this_size) { buffer_size = this_size; -Index: gdb-7.7.90.20140613/gdb/findcmd.c +Index: gdb-7.10.90.20160211/gdb/findcmd.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/findcmd.c 2014-06-13 22:14:49.726846384 +0200 -+++ gdb-7.7.90.20140613/gdb/findcmd.c 2014-06-13 22:14:53.166850084 +0200 -@@ -185,6 +185,7 @@ parse_find_args (char *args, ULONGEST *m +--- gdb-7.10.90.20160211.orig/gdb/findcmd.c 2016-02-11 20:56:59.226850742 +0100 ++++ gdb-7.10.90.20160211/gdb/findcmd.c 2016-02-11 20:57:05.387891238 +0100 +@@ -184,6 +184,7 @@ size_t current_offset = pattern_buf_end - pattern_buf; pattern_buf_size = pattern_buf_size_need * 2; + ulongest_fits_host_or_error (pattern_buf_size); - pattern_buf = xrealloc (pattern_buf, pattern_buf_size); + pattern_buf = (gdb_byte *) xrealloc (pattern_buf, pattern_buf_size); pattern_buf_end = pattern_buf + current_offset; } -Index: gdb-7.7.90.20140613/gdb/p-valprint.c +Index: gdb-7.10.90.20160211/gdb/p-valprint.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/p-valprint.c 2014-06-13 22:14:49.728846387 +0200 -+++ gdb-7.7.90.20140613/gdb/p-valprint.c 2014-06-13 22:14:53.166850084 +0200 -@@ -772,6 +772,7 @@ pascal_object_print_value (struct type * +--- gdb-7.10.90.20160211.orig/gdb/p-valprint.c 2016-02-11 20:56:59.226850742 +0100 ++++ gdb-7.10.90.20160211/gdb/p-valprint.c 2016-02-11 20:57:05.387891238 +0100 +@@ -769,6 +769,7 @@ gdb_byte *buf; struct cleanup *back_to; + ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); - buf = xmalloc (TYPE_LENGTH (baseclass)); + buf = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, buf); -Index: gdb-7.7.90.20140613/gdb/utils.c +Index: gdb-7.10.90.20160211/gdb/utils.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/utils.c 2014-06-13 22:14:53.166850084 +0200 -+++ gdb-7.7.90.20140613/gdb/utils.c 2014-06-13 22:15:16.839875341 +0200 -@@ -2838,6 +2838,18 @@ string_to_core_addr (const char *my_stri +--- gdb-7.10.90.20160211.orig/gdb/utils.c 2016-02-11 20:56:59.227850749 +0100 ++++ gdb-7.10.90.20160211/gdb/utils.c 2016-02-11 20:57:05.388891244 +0100 +@@ -2837,6 +2837,18 @@ return addr; } @@ -151,59 +151,52 @@ Index: gdb-7.7.90.20140613/gdb/utils.c char * gdb_realpath (const char *filename) { -Index: gdb-7.7.90.20140613/gdb/valops.c +Index: gdb-7.10.90.20160211/gdb/valops.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/valops.c 2014-06-13 22:14:49.730846389 +0200 -+++ gdb-7.7.90.20140613/gdb/valops.c 2014-06-13 22:14:53.169850088 +0200 -@@ -2074,6 +2074,7 @@ search_struct_method (const char *name, +--- gdb-7.10.90.20160211.orig/gdb/valops.c 2016-02-11 20:56:59.228850755 +0100 ++++ gdb-7.10.90.20160211/gdb/valops.c 2016-02-11 20:57:05.389891251 +0100 +@@ -2057,6 +2057,7 @@ struct cleanup *back_to; CORE_ADDR address; + ulongest_fits_host_or_error (TYPE_LENGTH (baseclass)); - tmp = xmalloc (TYPE_LENGTH (baseclass)); + tmp = (gdb_byte *) xmalloc (TYPE_LENGTH (baseclass)); back_to = make_cleanup (xfree, tmp); address = value_address (*arg1p); -Index: gdb-7.7.90.20140613/gdb/value.c +Index: gdb-7.10.90.20160211/gdb/value.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/value.c 2014-06-13 22:14:49.732846391 +0200 -+++ gdb-7.7.90.20140613/gdb/value.c 2014-06-13 22:14:53.169850088 +0200 -@@ -824,6 +824,7 @@ allocate_value_lazy (struct type *type) +--- gdb-7.10.90.20160211.orig/gdb/value.c 2016-02-11 20:56:59.229850762 +0100 ++++ gdb-7.10.90.20160211/gdb/value.c 2016-02-11 20:58:35.095480877 +0100 +@@ -935,6 +935,7 @@ description correctly. */ check_typedef (type); + ulongest_fits_host_or_error (TYPE_LENGTH (type)); - val = (struct value *) xzalloc (sizeof (struct value)); + val = XCNEW (struct value); val->contents = NULL; val->next = all_values; -@@ -855,6 +856,8 @@ allocate_value_lazy (struct type *type) +@@ -1034,6 +1035,8 @@ static void allocate_value_contents (struct value *val) { + ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type)); + if (!val->contents) - val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type)); - } -@@ -2831,8 +2834,12 @@ void - set_value_enclosing_type (struct value *val, struct type *new_encl_type) - { - if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) -- val->contents = -- (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type)); -+ { + { + check_type_length_before_alloc (val->enclosing_type); +@@ -3090,6 +3093,7 @@ + if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) + { + check_type_length_before_alloc (new_encl_type); + ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type)); -+ -+ val->contents = -+ (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type)); -+ } - - val->enclosing_type = new_encl_type; - } -Index: gdb-7.7.90.20140613/gdb/vax-tdep.c + val->contents + = (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type)); + } +Index: gdb-7.10.90.20160211/gdb/vax-tdep.c =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/vax-tdep.c 2014-06-13 22:14:49.732846391 +0200 -+++ gdb-7.7.90.20140613/gdb/vax-tdep.c 2014-06-13 22:14:53.169850088 +0200 -@@ -223,6 +223,7 @@ vax_return_value (struct gdbarch *gdbarc +--- gdb-7.10.90.20160211.orig/gdb/vax-tdep.c 2016-02-11 20:56:59.229850762 +0100 ++++ gdb-7.10.90.20160211/gdb/vax-tdep.c 2016-02-11 20:57:05.391891264 +0100 +@@ -219,6 +219,7 @@ ULONGEST addr; regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr); @@ -211,11 +204,11 @@ Index: gdb-7.7.90.20140613/gdb/vax-tdep.c read_memory (addr, readbuf, len); } -Index: gdb-7.7.90.20140613/gdb/defs.h +Index: gdb-7.10.90.20160211/gdb/defs.h =================================================================== ---- gdb-7.7.90.20140613.orig/gdb/defs.h 2014-06-13 22:14:49.732846391 +0200 -+++ gdb-7.7.90.20140613/gdb/defs.h 2014-06-13 22:14:53.169850088 +0200 -@@ -756,4 +756,6 @@ enum block_enum +--- gdb-7.10.90.20160211.orig/gdb/defs.h 2016-02-11 20:56:59.229850762 +0100 ++++ gdb-7.10.90.20160211/gdb/defs.h 2016-02-11 20:57:05.391891264 +0100 +@@ -690,4 +690,6 @@ #include "utils.h" diff --git a/SOURCES/gdb-rhbz795424-bitpos-22of25.patch b/SOURCES/gdb-rhbz795424-bitpos-22of25.patch index ecca068..2f5b484 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-22of25.patch +++ b/SOURCES/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.50.20141228/gdb/arm-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/arm-linux-nat.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/arm-linux-nat.c 2015-11-08 10:36:33.050071812 +0100 ++++ gdb-7.10.50.20151027/gdb/arm-linux-nat.c 2015-11-08 10:36:33.094072110 +0100 +@@ -1209,7 +1209,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.50.20141228/gdb/arm-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.8.50.20141228/gdb/ppc-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/ppc-linux-nat.c =================================================================== ---- 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) +--- gdb-7.10.50.20151027.orig/gdb/ppc-linux-nat.c 2015-11-08 10:36:33.064071907 +0100 ++++ gdb-7.10.50.20151027/gdb/ppc-linux-nat.c 2015-11-08 10:36:33.095072117 +0100 +@@ -1807,11 +1807,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.50.20141228/gdb/ppc-linux-nat.c CORE_ADDR addr_end_data, addr_end_dvc; /* The DVC register compares bytes within fixed-length windows which -@@ -1951,7 +1951,7 @@ num_memory_accesses (struct value *v) +@@ -1898,7 +1898,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.50.20141228/gdb/ppc-linux-nat.c { int pc = 1, num_accesses_left, num_accesses_right; struct value *left_val, *right_val, *left_chain, *right_chain; -@@ -2019,7 +2019,7 @@ check_condition (CORE_ADDR watch_addr, s +@@ -1966,7 +1966,7 @@ check_condition (CORE_ADDR watch_addr, s true. */ static int ppc_linux_can_accel_watchpoint_condition (struct target_ops *self, @@ -146,16 +146,16 @@ Index: gdb-7.8.50.20141228/gdb/ppc-linux-nat.c struct expression *cond) { CORE_ADDR data_value; -@@ -2036,7 +2036,7 @@ ppc_linux_can_accel_watchpoint_condition +@@ -1983,7 +1983,7 @@ ppc_linux_can_accel_watchpoint_condition static void create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr, -- int len, int rw, struct expression *cond, -+ LONGEST len, int rw, struct expression *cond, - int insert) +- int len, enum target_hw_bp_type type, ++ LONGEST len, enum target_hw_bp_type type, + struct expression *cond, int insert) { if (len == 1 -@@ -2302,7 +2302,7 @@ ppc_linux_stopped_by_watchpoint (struct +@@ -2249,7 +2249,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.50.20141228/gdb/ppc-linux-nat.c { int mask; -Index: gdb-7.8.50.20141228/gdb/procfs.c +Index: gdb-7.10.50.20151027/gdb/procfs.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/procfs.c 2015-11-08 10:36:33.065071913 +0100 ++++ gdb-7.10.50.20151027/gdb/procfs.c 2015-11-08 10:36:33.096072123 +0100 +@@ -2427,7 +2427,7 @@ procfs_address_to_host_pointer (CORE_ADD #endif static int @@ -177,7 +177,7 @@ Index: gdb-7.8.50.20141228/gdb/procfs.c { #if !defined (PCWATCH) && !defined (PIOCSWATCH) /* If neither or these is defined, we can't support watchpoints. -@@ -4705,7 +4705,7 @@ procfs_pid_to_str (struct target_ops *op +@@ -4706,7 +4706,7 @@ procfs_pid_to_str (struct target_ops *op /* Insert a watchpoint. */ static int @@ -186,11 +186,11 @@ Index: gdb-7.8.50.20141228/gdb/procfs.c int after) { #ifndef AIX5 -Index: gdb-7.8.50.20141228/gdb/remote.c +Index: gdb-7.10.50.20151027/gdb/remote.c =================================================================== ---- 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_ +--- gdb-7.10.50.20151027.orig/gdb/remote.c 2015-11-08 10:36:33.067071927 +0100 ++++ gdb-7.10.50.20151027/gdb/remote.c 2015-11-08 10:36:33.097072130 +0100 +@@ -9085,7 +9085,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.50.20141228/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -@@ -8318,7 +8318,7 @@ remote_insert_watchpoint (struct target_ +@@ -9105,7 +9105,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.50.20141228/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -8348,7 +8348,7 @@ remote_remove_watchpoint (struct target_ +@@ -9134,7 +9134,7 @@ remote_remove_watchpoint (struct target_ p = strchr (rs->buf, '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -217,10 +217,10 @@ Index: gdb-7.8.50.20141228/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); -Index: gdb-7.8.50.20141228/gdb/target.c +Index: gdb-7.10.50.20151027/gdb/target.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/target.c 2015-11-08 10:36:33.069071941 +0100 ++++ gdb-7.10.50.20151027/gdb/target.c 2015-11-08 10:36:33.098072137 +0100 @@ -51,7 +51,7 @@ static void generic_tls_error (void) ATT static void default_terminal_info (struct target_ops *, const char *, int); @@ -230,7 +230,7 @@ Index: gdb-7.8.50.20141228/gdb/target.c static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -2983,7 +2983,7 @@ default_region_ok_for_hw_watchpoint (str +@@ -3140,7 +3140,7 @@ default_region_ok_for_hw_watchpoint (str static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -239,11 +239,11 @@ Index: gdb-7.8.50.20141228/gdb/target.c { return addr >= start && addr < start + length; } -Index: gdb-7.8.50.20141228/gdb/target.h +Index: gdb-7.10.50.20151027/gdb/target.h =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/target.h 2015-11-08 10:36:33.069071941 +0100 ++++ gdb-7.10.50.20151027/gdb/target.h 2015-11-08 10:36:33.098072137 +0100 +@@ -543,7 +543,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 *, @@ -252,7 +252,7 @@ Index: gdb-7.8.50.20141228/gdb/target.h TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range); /* Documentation of this routine is provided with the corresponding -@@ -493,7 +493,7 @@ struct target_ops +@@ -553,7 +553,7 @@ struct target_ops TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint); int (*to_can_accel_watchpoint_condition) (struct target_ops *, @@ -261,80 +261,11 @@ Index: gdb-7.8.50.20141228/gdb/target.h struct expression *) TARGET_DEFAULT_RETURN (0); int (*to_masked_watch_num_registers) (struct target_ops *, -Index: gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c +Index: gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c =================================================================== ---- 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, -- int len, int type) -+ LONGEST len, int type) - { - int i; - - fprintf_unfiltered (gdb_stdlog, "%s", func); - if (addr || len) -- fprintf_unfiltered (gdb_stdlog, " (addr=0x%08lx, len=%d, type=%s)", -- (unsigned long) addr, len, -+ fprintf_unfiltered (gdb_stdlog, " (addr=0x%08lx, len=%s, type=%s)", -+ (unsigned long) addr, plongest (len), - type == hw_write ? "hw-write-watchpoint" - : (type == hw_read ? "hw-read-watchpoint" - : (type == hw_access ? "hw-access-watchpoint" -@@ -851,9 +851,10 @@ aarch64_linux_read_description (struct t - gdbserver/linux-aarch64-low.c for more information. */ - - static void --aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p, -+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, -+ CORE_ADDR *aligned_addr_p, - int *aligned_len_p, CORE_ADDR *next_addr_p, -- int *next_len_p) -+ LONGEST *next_len_p) - { - int aligned_len; - unsigned int offset; -@@ -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 --aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) -+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len) - { - unsigned int alignment = is_watchpoint ? AARCH64_HWP_ALIGNMENT - : AARCH64_HBP_ALIGNMENT; -@@ -1272,7 +1273,7 @@ aarch64_handle_aligned_watchpoint (int t - Return 0 if succeed. */ - - static int --aarch64_handle_unaligned_watchpoint (int type, CORE_ADDR addr, int len, -+aarch64_handle_unaligned_watchpoint (int type, CORE_ADDR addr, LONGEST len, - int is_insert) - { - struct aarch64_debug_reg_state *state -@@ -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" --" next_addr: 0x%08lx, next_len: %d\n", -- is_insert, aligned_addr, aligned_len, addr, len); -+" next_addr: 0x%08lx, next_len: %s\n", -+ is_insert, aligned_addr, aligned_len, addr, plongest (len)); - - if (ret != 0) - return ret; -@@ -1310,7 +1311,7 @@ aarch64_handle_unaligned_watchpoint (int - /* Implements insertion and removal of a single watchpoint. */ - - static int --aarch64_handle_watchpoint (int type, CORE_ADDR addr, int len, int is_insert) -+aarch64_handle_watchpoint (int type, CORE_ADDR addr, LONGEST len, int is_insert) - { - if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) - return aarch64_handle_aligned_watchpoint (type, addr, len, is_insert); -@@ -1479,7 +1480,7 @@ aarch64_linux_stopped_by_watchpoint (str +--- gdb-7.10.50.20151027.orig/gdb/aarch64-linux-nat.c 2015-11-08 10:36:33.074071975 +0100 ++++ gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c 2015-11-08 10:36:33.098072137 +0100 +@@ -795,7 +795,7 @@ aarch64_linux_stopped_by_watchpoint (str static int aarch64_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, @@ -343,11 +274,11 @@ Index: gdb-7.8.50.20141228/gdb/aarch64-linux-nat.c { return start <= addr && start + length - 1 >= addr; } -Index: gdb-7.8.50.20141228/gdb/target-delegates.c +Index: gdb-7.10.50.20151027/gdb/target-delegates.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/target-delegates.c 2015-11-08 10:36:33.073071968 +0100 ++++ gdb-7.10.50.20151027/gdb/target-delegates.c 2015-11-08 10:36:33.099072144 +0100 +@@ -709,14 +709,14 @@ debug_stopped_data_address (struct targe } static int @@ -364,7 +295,7 @@ Index: gdb-7.8.50.20141228/gdb/target-delegates.c { 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 +@@ -728,7 +728,7 @@ debug_watchpoint_addr_within_range (stru fputs_unfiltered (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg2); fputs_unfiltered (", ", gdb_stdlog); @@ -373,7 +304,7 @@ Index: gdb-7.8.50.20141228/gdb/target-delegates.c 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 +@@ -761,20 +761,20 @@ debug_region_ok_for_hw_watchpoint (struc } static int @@ -397,7 +328,7 @@ Index: gdb-7.8.50.20141228/gdb/target-delegates.c { 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 +@@ -784,7 +784,7 @@ debug_can_accel_watchpoint_condition (st fputs_unfiltered (", ", gdb_stdlog); target_debug_print_CORE_ADDR (arg1); fputs_unfiltered (", ", gdb_stdlog); @@ -406,3 +337,99 @@ Index: gdb-7.8.50.20141228/gdb/target-delegates.c fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg3); fputs_unfiltered (", ", gdb_stdlog); +Index: gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.c +=================================================================== +--- gdb-7.10.50.20151027.orig/gdb/nat/aarch64-linux-hw-point.c 2015-10-27 02:48:31.000000000 +0100 ++++ gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.c 2015-11-08 10:36:33.099072144 +0100 +@@ -111,7 +111,7 @@ aarch64_point_encode_ctrl_reg (enum targ + Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */ + + static int +-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len) ++aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len) + { + unsigned int alignment = 0; + +@@ -180,9 +180,10 @@ aarch64_point_is_aligned (int is_watchpo + limitations can be largely relaxed with some further work. */ + + static void +-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p, ++aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len, ++ CORE_ADDR *aligned_addr_p, + int *aligned_len_p, CORE_ADDR *next_addr_p, +- int *next_len_p) ++ LONGEST *next_len_p) + { + int aligned_len; + unsigned int offset; +@@ -494,7 +495,7 @@ aarch64_handle_aligned_watchpoint (enum + + static int + aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, +- CORE_ADDR addr, int len, int is_insert, ++ CORE_ADDR addr, LONGEST len, int is_insert, + struct aarch64_debug_reg_state *state) + { + while (len > 0) +@@ -517,9 +518,9 @@ aarch64_handle_unaligned_watchpoint (enu + " " + "aligned_addr: %s, aligned_len: %d\n" + " " +- "next_addr: %s, next_len: %d\n", ++ "next_addr: %s, next_len: %s\n", + is_insert, core_addr_to_string_nz (aligned_addr), +- aligned_len, core_addr_to_string_nz (addr), len); ++ aligned_len, core_addr_to_string_nz (addr), plongest (len)); + + if (ret != 0) + return ret; +@@ -530,7 +531,7 @@ aarch64_handle_unaligned_watchpoint (enu + + int + aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, +- int len, int is_insert, ++ LONGEST len, int is_insert, + struct aarch64_debug_reg_state *state) + { + if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) +@@ -581,14 +582,14 @@ aarch64_linux_set_debug_regs (const stru + void + aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, + const char *func, CORE_ADDR addr, +- int len, enum target_hw_bp_type type) ++ LONGEST len, enum target_hw_bp_type type) + { + int i; + + debug_printf ("%s", func); + if (addr || len) +- debug_printf (" (addr=0x%08lx, len=%d, type=%s)", +- (unsigned long) addr, len, ++ debug_printf (" (addr=0x%08lx, len=%s, type=%s)", ++ (unsigned long) addr, plongest (len), + type == hw_write ? "hw-write-watchpoint" + : (type == hw_read ? "hw-read-watchpoint" + : (type == hw_access ? "hw-access-watchpoint" +Index: gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.h +=================================================================== +--- gdb-7.10.50.20151027.orig/gdb/nat/aarch64-linux-hw-point.h 2015-10-27 02:48:31.000000000 +0100 ++++ gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.h 2015-11-08 10:36:47.656170839 +0100 +@@ -168,7 +168,7 @@ int aarch64_handle_breakpoint (enum targ + int len, int is_insert, + struct aarch64_debug_reg_state *state); + int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, +- int len, int is_insert, ++ LONGEST len, int is_insert, + struct aarch64_debug_reg_state *state); + + void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, +@@ -176,7 +176,7 @@ void aarch64_linux_set_debug_regs (const + + void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, + const char *func, CORE_ADDR addr, +- int len, enum target_hw_bp_type type); ++ LONGEST len, enum target_hw_bp_type type); + + void aarch64_linux_get_debug_reg_capacity (int tid); + diff --git a/SOURCES/gdb-rhbz795424-bitpos-23of25.patch b/SOURCES/gdb-rhbz795424-bitpos-23of25.patch index 862f3aa..1f6d237 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-23of25.patch +++ b/SOURCES/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.9.50.20150520/gdb/alpha-tdep.c +Index: gdb-7.10.50.20160106/gdb/alpha-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/alpha-tdep.c 2015-05-31 17:15:01.056868035 +0200 -+++ gdb-7.9.50.20150520/gdb/alpha-tdep.c 2015-05-31 17:15:03.419882846 +0200 -@@ -298,18 +298,18 @@ alpha_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/alpha-tdep.c 2016-01-08 19:16:16.592813990 +0100 ++++ gdb-7.10.50.20160106/gdb/alpha-tdep.c 2016-01-08 19:16:20.308834717 +0100 +@@ -299,17 +299,17 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -155,8 +155,7 @@ Index: gdb-7.9.50.20150520/gdb/alpha-tdep.c + ssize_t len; + ssize_t offset; }; - struct alpha_arg *alpha_args - = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg)); + struct alpha_arg *alpha_args = XALLOCAVEC (struct alpha_arg, nargs); struct alpha_arg *m_arg; gdb_byte arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS]; - int required_arg_regs; @@ -164,7 +163,7 @@ Index: gdb-7.9.50.20150520/gdb/alpha-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ -@@ -429,8 +429,8 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -429,8 +429,8 @@ for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; @@ -175,7 +174,7 @@ Index: gdb-7.9.50.20150520/gdb/alpha-tdep.c /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) -@@ -442,7 +442,7 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -442,7 +442,7 @@ } else { @@ -184,11 +183,11 @@ Index: gdb-7.9.50.20150520/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.9.50.20150520/gdb/amd64-tdep.c +Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/amd64-tdep.c 2015-05-31 17:15:01.058868047 +0200 -+++ gdb-7.9.50.20150520/gdb/amd64-tdep.c 2015-05-31 17:15:40.253113722 +0200 -@@ -701,7 +701,7 @@ amd64_return_value (struct gdbarch *gdba +--- gdb-7.10.50.20160106.orig/gdb/amd64-tdep.c 2016-01-08 19:16:16.594814001 +0100 ++++ gdb-7.10.50.20160106/gdb/amd64-tdep.c 2016-01-08 19:16:20.309834723 +0100 +@@ -699,7 +699,7 @@ gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class theclass[2]; @@ -197,9 +196,9 @@ Index: gdb-7.9.50.20150520/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; -@@ -852,8 +852,8 @@ amd64_push_arguments (struct regcache *r +@@ -850,8 +850,8 @@ }; - struct value **stack_args = alloca (nargs * sizeof (struct value *)); + struct value **stack_args = XALLOCAVEC (struct value *, nargs); int num_stack_args = 0; - int num_elements = 0; - int element = 0; @@ -208,7 +207,7 @@ Index: gdb-7.9.50.20150520/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -865,7 +865,7 @@ amd64_push_arguments (struct regcache *r +@@ -863,7 +863,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -217,11 +216,11 @@ Index: gdb-7.9.50.20150520/gdb/amd64-tdep.c enum amd64_reg_class theclass[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.9.50.20150520/gdb/amd64-windows-tdep.c +Index: gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/amd64-windows-tdep.c 2015-05-31 17:15:01.059868054 +0200 -+++ gdb-7.9.50.20150520/gdb/amd64-windows-tdep.c 2015-05-31 17:15:03.421882859 +0200 -@@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar +--- gdb-7.10.50.20160106.orig/gdb/amd64-windows-tdep.c 2016-01-08 19:16:16.595814006 +0100 ++++ gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c 2016-01-08 19:16:20.310834728 +0100 +@@ -288,7 +288,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -230,11 +229,11 @@ Index: gdb-7.9.50.20150520/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.9.50.20150520/gdb/arm-tdep.c +Index: gdb-7.10.50.20160106/gdb/arm-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/arm-tdep.c 2015-05-31 17:15:01.069868116 +0200 -+++ gdb-7.9.50.20150520/gdb/arm-tdep.c 2015-05-31 17:15:03.425882884 +0200 -@@ -3537,7 +3537,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc +--- gdb-7.10.50.20160106.orig/gdb/arm-tdep.c 2016-01-08 19:16:16.603814051 +0100 ++++ gdb-7.10.50.20160106/gdb/arm-tdep.c 2016-01-08 19:17:05.737088107 +0100 +@@ -3340,7 +3340,7 @@ array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -243,16 +242,16 @@ Index: gdb-7.9.50.20150520/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3600,7 +3600,7 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3423,7 +3423,7 @@ + } + else + { +- int count; ++ LONGEST count; + unsigned unitlen; - case TYPE_CODE_ARRAY: - { -- int count; -+ LONGEST count; - unsigned unitlen; - count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); - if (count == -1) -@@ -3620,13 +3620,15 @@ arm_vfp_cprc_sub_candidate (struct type + count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), +@@ -3446,13 +3446,15 @@ case TYPE_CODE_STRUCT: { @@ -271,7 +270,7 @@ Index: gdb-7.9.50.20150520/gdb/arm-tdep.c if (sub_count == -1) return -1; count += sub_count; -@@ -3646,13 +3648,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3472,13 +3474,15 @@ case TYPE_CODE_UNION: { @@ -290,7 +289,7 @@ Index: gdb-7.9.50.20150520/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3688,7 +3692,7 @@ arm_vfp_call_candidate (struct type *t, +@@ -3514,7 +3518,7 @@ int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -299,7 +298,7 @@ Index: gdb-7.9.50.20150520/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3769,7 +3773,7 @@ arm_push_dummy_call (struct gdbarch *gdb +@@ -3595,7 +3599,7 @@ for (argnum = 0; argnum < nargs; argnum++) { @@ -308,28 +307,27 @@ Index: gdb-7.9.50.20150520/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.9.50.20150520/gdb/avr-tdep.c +Index: gdb-7.10.50.20160106/gdb/avr-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/avr-tdep.c 2015-05-31 17:15:01.071868129 +0200 -+++ gdb-7.9.50.20150520/gdb/avr-tdep.c 2015-05-31 17:15:03.425882884 +0200 -@@ -1196,13 +1196,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s +--- gdb-7.10.50.20160106.orig/gdb/avr-tdep.c 2016-01-08 19:16:16.604814057 +0100 ++++ gdb-7.10.50.20160106/gdb/avr-tdep.c 2016-01-08 19:16:20.314834750 +0100 +@@ -1196,13 +1196,13 @@ struct stack_item { - int len; + ssize_t len; struct stack_item *prev; - void *data; + gdb_byte *data; }; static struct stack_item * -push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len) -+push_stack_item (struct stack_item *prev, const bfd_byte *contents, -+ ssize_t len) ++push_stack_item (struct stack_item *prev, const bfd_byte *contents, ssize_t len) { struct stack_item *si; - si = xmalloc (sizeof (struct stack_item)); -@@ -1291,12 +1292,12 @@ avr_push_dummy_call (struct gdbarch *gdb + si = XNEW (struct stack_item); +@@ -1291,12 +1291,12 @@ for (i = 0; i < nargs; i++) { @@ -345,11 +343,11 @@ Index: gdb-7.9.50.20150520/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.9.50.20150520/gdb/bfin-tdep.c +Index: gdb-7.10.50.20160106/gdb/bfin-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/bfin-tdep.c 2015-05-31 17:15:01.071868129 +0200 -+++ gdb-7.9.50.20150520/gdb/bfin-tdep.c 2015-05-31 17:15:03.426882890 +0200 -@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/bfin-tdep.c 2016-01-08 19:16:16.605814062 +0100 ++++ gdb-7.10.50.20160106/gdb/bfin-tdep.c 2016-01-08 19:16:20.315834756 +0100 +@@ -504,7 +504,7 @@ gdb_byte buf[4]; int i; long reg_r0, reg_r1, reg_r2; @@ -358,7 +356,7 @@ Index: gdb-7.9.50.20150520/gdb/bfin-tdep.c enum bfin_abi abi = bfin_abi (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -528,7 +528,7 @@ bfin_push_dummy_call (struct gdbarch *gd +@@ -528,7 +528,7 @@ { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); @@ -366,28 +364,28 @@ Index: gdb-7.9.50.20150520/gdb/bfin-tdep.c + ssize_t container_len = (TYPE_LENGTH (value_type) + 3) & ~3; sp -= container_len; - write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.9.50.20150520/gdb/cris-tdep.c + write_memory (sp, value_contents (args[i]), container_len); +Index: gdb-7.10.50.20160106/gdb/cris-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/cris-tdep.c 2015-05-31 17:15:01.073868142 +0200 -+++ gdb-7.9.50.20150520/gdb/cris-tdep.c 2015-05-31 17:15:03.427882897 +0200 -@@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct +--- gdb-7.10.50.20160106.orig/gdb/cris-tdep.c 2016-01-08 19:16:16.606814068 +0100 ++++ gdb-7.10.50.20160106/gdb/cris-tdep.c 2016-01-08 19:16:20.316834762 +0100 +@@ -663,13 +663,13 @@ struct stack_item { - int len; + ssize_t len; struct stack_item *prev; - void *data; + gdb_byte *data; }; static struct stack_item * -push_stack_item (struct stack_item *prev, const gdb_byte *contents, int len) +push_stack_item (struct stack_item *prev, const gdb_byte *contents, ssize_t len) { - struct stack_item *si; - si = xmalloc (sizeof (struct stack_item)); -@@ -842,13 +842,13 @@ cris_push_dummy_call (struct gdbarch *gd + struct stack_item *si = XNEW (struct stack_item); + si->data = (gdb_byte *) xmalloc (len); +@@ -841,13 +841,13 @@ for (argnum = 0; argnum < nargs; argnum++) { @@ -405,11 +403,11 @@ Index: gdb-7.9.50.20150520/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.9.50.20150520/gdb/h8300-tdep.c +Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/h8300-tdep.c 2015-05-31 17:15:01.074868148 +0200 -+++ gdb-7.9.50.20150520/gdb/h8300-tdep.c 2015-05-31 17:15:03.427882897 +0200 -@@ -639,7 +639,7 @@ h8300_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/h8300-tdep.c 2016-01-08 19:16:16.607814073 +0100 ++++ gdb-7.10.50.20160106/gdb/h8300-tdep.c 2016-01-08 19:16:20.316834762 +0100 +@@ -639,7 +639,7 @@ int struct_return, CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -418,21 +416,21 @@ Index: gdb-7.9.50.20150520/gdb/h8300-tdep.c int wordsize = BINWORD (gdbarch); int reg = E_ARG0_REGNUM; int argument; -@@ -666,11 +666,11 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -666,11 +666,11 @@ { struct cleanup *back_to; struct type *type = value_type (args[argument]); - int len = TYPE_LENGTH (type); - char *contents = (char *) value_contents (args[argument]); + ssize_t len = TYPE_LENGTH (type); + char *contents = (char *) value_contents (args[argument]); /* Pad the argument appropriately. */ - int padded_len = align_up (len, wordsize); + ssize_t padded_len = align_up (len, wordsize); - gdb_byte *padded = xmalloc (padded_len); + gdb_byte *padded = (gdb_byte *) xmalloc (padded_len); back_to = make_cleanup (xfree, padded); -@@ -699,7 +699,7 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -699,7 +699,7 @@ /* 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 +439,11 @@ Index: gdb-7.9.50.20150520/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.9.50.20150520/gdb/hppa-tdep.c +Index: gdb-7.10.50.20160106/gdb/hppa-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/hppa-tdep.c 2015-05-31 17:15:01.076868160 +0200 -+++ gdb-7.9.50.20150520/gdb/hppa-tdep.c 2015-05-31 17:15:03.428882903 +0200 -@@ -991,7 +991,7 @@ hppa64_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/hppa-tdep.c 2016-01-08 19:16:16.609814085 +0100 ++++ gdb-7.10.50.20160106/gdb/hppa-tdep.c 2016-01-08 19:16:20.317834767 +0100 +@@ -995,7 +995,7 @@ { struct value *arg = args[i]; struct type *type = value_type (arg); @@ -454,7 +452,7 @@ Index: gdb-7.9.50.20150520/gdb/hppa-tdep.c const bfd_byte *valbuf; bfd_byte fptrbuf[8]; int regnum; -@@ -1186,7 +1186,7 @@ hppa64_return_value (struct gdbarch *gdb +@@ -1190,7 +1190,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -463,11 +461,11 @@ Index: gdb-7.9.50.20150520/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.9.50.20150520/gdb/i386-darwin-tdep.c +Index: gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/i386-darwin-tdep.c 2015-05-31 17:15:01.076868160 +0200 -+++ gdb-7.9.50.20150520/gdb/i386-darwin-tdep.c 2015-05-31 17:15:03.428882903 +0200 -@@ -163,7 +163,7 @@ i386_darwin_push_dummy_call (struct gdba +--- gdb-7.10.50.20160106.orig/gdb/i386-darwin-tdep.c 2016-01-08 19:16:16.609814085 +0100 ++++ gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c 2016-01-08 19:16:20.317834767 +0100 +@@ -163,7 +163,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -476,11 +474,11 @@ Index: gdb-7.9.50.20150520/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.9.50.20150520/gdb/i386-tdep.c +Index: gdb-7.10.50.20160106/gdb/i386-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/i386-tdep.c 2015-05-31 17:15:01.082868198 +0200 -+++ gdb-7.9.50.20150520/gdb/i386-tdep.c 2015-05-31 17:15:03.430882915 +0200 -@@ -2651,7 +2651,7 @@ i386_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/i386-tdep.c 2016-01-08 19:16:16.615814118 +0100 ++++ gdb-7.10.50.20160106/gdb/i386-tdep.c 2016-01-08 19:16:20.319834778 +0100 +@@ -2663,7 +2663,7 @@ gdb_byte buf[4]; int i; int write_pass; @@ -489,7 +487,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c /* Determine the total space required for arguments and struct return address in a first pass (allowing for 16-byte-aligned -@@ -2659,7 +2659,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2671,7 +2671,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -498,7 +496,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c if (struct_return) { -@@ -2676,7 +2676,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2688,7 +2688,7 @@ for (i = 0; i < nargs; i++) { @@ -507,7 +505,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c if (write_pass) { -@@ -2883,7 +2883,7 @@ i386_reg_struct_return_p (struct gdbarch +@@ -2895,7 +2895,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -516,7 +514,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3629,7 +3629,7 @@ static int +@@ -3641,7 +3641,7 @@ i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -525,7 +523,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3662,7 +3662,7 @@ i386_register_to_value (struct frame_inf +@@ -3674,7 +3674,7 @@ int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -534,7 +532,7 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3698,7 +3698,7 @@ static void +@@ -3710,7 +3710,7 @@ i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -543,11 +541,11 @@ Index: gdb-7.9.50.20150520/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.9.50.20150520/gdb/iq2000-tdep.c +Index: gdb-7.10.50.20160106/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/iq2000-tdep.c 2015-05-31 17:15:01.083868204 +0200 -+++ gdb-7.9.50.20150520/gdb/iq2000-tdep.c 2015-05-31 17:15:03.431882922 +0200 -@@ -651,8 +651,9 @@ iq2000_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/iq2000-tdep.c 2016-01-08 19:16:16.616814124 +0100 ++++ gdb-7.10.50.20160106/gdb/iq2000-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -651,8 +651,9 @@ const bfd_byte *val; bfd_byte buf[4]; struct type *type; @@ -559,11 +557,11 @@ Index: gdb-7.9.50.20150520/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.9.50.20150520/gdb/m32r-tdep.c +Index: gdb-7.10.50.20160106/gdb/m32r-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/m32r-tdep.c 2015-05-31 17:15:01.083868204 +0200 -+++ gdb-7.9.50.20150520/gdb/m32r-tdep.c 2015-05-31 17:15:03.431882922 +0200 -@@ -687,7 +687,7 @@ m32r_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/m32r-tdep.c 2016-01-08 19:16:16.616814124 +0100 ++++ gdb-7.10.50.20160106/gdb/m32r-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -687,7 +687,7 @@ CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[MAX_REGISTER_SIZE]; @@ -572,11 +570,11 @@ Index: gdb-7.9.50.20150520/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.9.50.20150520/gdb/m68k-tdep.c +Index: gdb-7.10.50.20160106/gdb/m68k-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/m68k-tdep.c 2015-05-31 17:15:01.084868210 +0200 -+++ gdb-7.9.50.20150520/gdb/m68k-tdep.c 2015-05-31 17:15:03.432882928 +0200 -@@ -382,7 +382,7 @@ m68k_reg_struct_return_p (struct gdbarch +--- gdb-7.10.50.20160106.orig/gdb/m68k-tdep.c 2016-01-08 19:16:16.617814129 +0100 ++++ gdb-7.10.50.20160106/gdb/m68k-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -382,7 +382,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -585,7 +583,7 @@ Index: gdb-7.9.50.20150520/gdb/m68k-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || code == TYPE_CODE_COMPLEX); -@@ -514,9 +514,9 @@ m68k_push_dummy_call (struct gdbarch *gd +@@ -514,9 +514,9 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -598,11 +596,11 @@ Index: gdb-7.9.50.20150520/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.9.50.20150520/gdb/m88k-tdep.c +Index: gdb-7.10.50.20160106/gdb/m88k-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/m88k-tdep.c 2015-05-31 17:15:01.085868217 +0200 -+++ gdb-7.9.50.20150520/gdb/m88k-tdep.c 2015-05-31 17:15:03.432882928 +0200 -@@ -257,13 +257,13 @@ m88k_store_arguments (struct regcache *r +--- gdb-7.10.50.20160106.orig/gdb/m88k-tdep.c 2016-01-08 19:16:16.617814129 +0100 ++++ gdb-7.10.50.20160106/gdb/m88k-tdep.c 2016-01-08 19:16:20.321834790 +0100 +@@ -257,13 +257,13 @@ { struct gdbarch *gdbarch = get_regcache_arch (regcache); int num_register_words = 0; @@ -618,7 +616,7 @@ Index: gdb-7.9.50.20150520/gdb/m88k-tdep.c if (m88k_integral_or_pointer_p (type) && len < 4) { -@@ -305,8 +305,8 @@ m88k_store_arguments (struct regcache *r +@@ -305,8 +305,8 @@ { const bfd_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -629,11 +627,11 @@ Index: gdb-7.9.50.20150520/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.9.50.20150520/gdb/mep-tdep.c +Index: gdb-7.10.50.20160106/gdb/mep-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/mep-tdep.c 2015-05-31 17:15:01.086868223 +0200 -+++ gdb-7.9.50.20150520/gdb/mep-tdep.c 2015-05-31 17:15:03.433882934 +0200 -@@ -2269,7 +2269,7 @@ push_large_arguments (CORE_ADDR sp, int +--- gdb-7.10.50.20160106.orig/gdb/mep-tdep.c 2016-01-08 19:16:16.618814135 +0100 ++++ gdb-7.10.50.20160106/gdb/mep-tdep.c 2016-01-08 19:16:20.321834790 +0100 +@@ -2272,7 +2272,7 @@ for (i = 0; i < argc; i++) { @@ -642,11 +640,11 @@ Index: gdb-7.9.50.20150520/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.9.50.20150520/gdb/mips-tdep.c +Index: gdb-7.10.50.20160106/gdb/mips-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/mips-tdep.c 2015-05-31 17:15:01.094868273 +0200 -+++ gdb-7.9.50.20150520/gdb/mips-tdep.c 2015-05-31 17:15:03.435882947 +0200 -@@ -455,7 +455,7 @@ static void +--- gdb-7.10.50.20160106.orig/gdb/mips-tdep.c 2016-01-08 19:16:16.626814179 +0100 ++++ gdb-7.10.50.20160106/gdb/mips-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -455,7 +455,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -655,7 +653,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c { int reg_offset = 0; -@@ -478,8 +478,8 @@ mips_xfer_register (struct gdbarch *gdba +@@ -478,8 +478,8 @@ } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -666,7 +664,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4551,13 +4551,13 @@ mips_eabi_push_dummy_call (struct gdbarc +@@ -4554,13 +4554,13 @@ gdb_byte valbuf[MAX_REGISTER_SIZE]; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -683,7 +681,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c /* The EABI passes structures that do not fit in a register by reference. */ -@@ -4826,7 +4826,7 @@ mips_eabi_return_value (struct gdbarch * +@@ -4829,7 +4829,7 @@ static int mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, @@ -692,7 +690,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c { int i; -@@ -4841,7 +4841,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar +@@ -4844,7 +4844,7 @@ for (i = 0; i < TYPE_NFIELDS (arg_type); i++) { @@ -701,7 +699,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4883,7 +4883,7 @@ mips_n32n64_push_dummy_call (struct gdba +@@ -4886,7 +4886,7 @@ int argreg; int float_argreg; int argnum; @@ -710,7 +708,7 @@ Index: gdb-7.9.50.20150520/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); -@@ -5234,11 +5234,11 @@ mips_n32n64_return_value (struct gdbarch +@@ -5237,11 +5237,11 @@ : MIPS_V0_REGNUM); field < TYPE_NFIELDS (type); field++, regnum += 2) { @@ -726,7 +724,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5280,8 +5280,8 @@ mips_n32n64_return_value (struct gdbarch +@@ -5283,8 +5283,8 @@ if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) @@ -737,7 +735,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5339,7 +5339,7 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5342,7 +5342,7 @@ int argreg; int float_argreg; int argnum; @@ -746,7 +744,7 @@ Index: gdb-7.9.50.20150520/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); -@@ -5403,13 +5403,13 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5406,13 +5406,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -763,7 +761,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c val = value_contents (arg); -@@ -5867,8 +5867,8 @@ mips_o64_push_dummy_call (struct gdbarch +@@ -5870,8 +5870,8 @@ int argreg; int float_argreg; int argnum; @@ -774,7 +772,7 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5928,13 +5928,13 @@ mips_o64_push_dummy_call (struct gdbarch +@@ -5931,13 +5931,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -791,11 +789,11 @@ Index: gdb-7.9.50.20150520/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.9.50.20150520/gdb/mn10300-tdep.c +Index: gdb-7.10.50.20160106/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/mn10300-tdep.c 2015-05-31 17:15:01.095868279 +0200 -+++ gdb-7.9.50.20150520/gdb/mn10300-tdep.c 2015-05-31 17:15:03.435882947 +0200 -@@ -1225,7 +1225,7 @@ mn10300_push_dummy_call (struct gdbarch +--- gdb-7.10.50.20160106.orig/gdb/mn10300-tdep.c 2016-01-08 19:16:16.627814185 +0100 ++++ gdb-7.10.50.20160106/gdb/mn10300-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -1227,7 +1227,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; @@ -804,11 +802,11 @@ Index: gdb-7.9.50.20150520/gdb/mn10300-tdep.c int stack_offset = 0; int argnum; const gdb_byte *val; -Index: gdb-7.9.50.20150520/gdb/mt-tdep.c +Index: gdb-7.10.50.20160106/gdb/mt-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/mt-tdep.c 2015-05-31 17:15:01.096868286 +0200 -+++ gdb-7.9.50.20150520/gdb/mt-tdep.c 2015-05-31 17:15:03.436882953 +0200 -@@ -781,9 +781,9 @@ mt_push_dummy_call (struct gdbarch *gdba +--- gdb-7.10.50.20160106.orig/gdb/mt-tdep.c 2016-01-08 19:16:16.628814190 +0100 ++++ gdb-7.10.50.20160106/gdb/mt-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -781,9 +781,9 @@ gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; int split_param_len = 0; @@ -820,11 +818,11 @@ Index: gdb-7.9.50.20150520/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c +Index: gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/ppc-sysv-tdep.c 2015-05-31 17:15:01.097868292 +0200 -+++ gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c 2015-05-31 17:15:03.436882953 +0200 -@@ -66,7 +66,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +--- gdb-7.10.50.20160106.orig/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:16.629814196 +0100 ++++ gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:20.325834812 +0100 +@@ -66,7 +66,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); ULONGEST saved_sp; @@ -833,7 +831,7 @@ Index: gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c int write_pass; gdb_assert (tdep->wordsize == 4); -@@ -97,9 +97,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -97,9 +97,9 @@ /* Next available vector register for vector arguments. */ int vreg = 2; /* Arguments start above the "LR save word" and "Back chain". */ @@ -845,7 +843,7 @@ Index: gdb-7.9.50.20150520/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 -@@ -118,7 +118,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -118,7 +118,7 @@ { struct value *arg = args[argno]; struct type *type = check_typedef (value_type (arg)); @@ -854,7 +852,7 @@ Index: gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1283,11 +1283,11 @@ struct ppc64_sysv_argpos +@@ -1283,11 +1283,11 @@ static void ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, @@ -868,11 +866,11 @@ Index: gdb-7.9.50.20150520/gdb/ppc-sysv-tdep.c /* Enforce alignment of stack location, if requested. */ if (align > tdep->wordsize) -Index: gdb-7.9.50.20150520/gdb/rl78-tdep.c +Index: gdb-7.10.50.20160106/gdb/rl78-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/rl78-tdep.c 2015-05-31 17:15:01.097868292 +0200 -+++ gdb-7.9.50.20150520/gdb/rl78-tdep.c 2015-05-31 17:15:03.437882959 +0200 -@@ -1333,8 +1333,8 @@ rl78_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/rl78-tdep.c 2016-01-08 19:16:16.629814196 +0100 ++++ gdb-7.10.50.20160106/gdb/rl78-tdep.c 2016-01-08 19:16:20.325834812 +0100 +@@ -1336,8 +1336,8 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -883,11 +881,11 @@ Index: gdb-7.9.50.20150520/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c +Index: gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/rs6000-aix-tdep.c 2015-05-31 17:15:01.098868298 +0200 -+++ gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c 2015-05-31 17:15:03.437882959 +0200 -@@ -186,9 +186,9 @@ rs6000_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:16.630814202 +0100 ++++ gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:20.326834817 +0100 +@@ -186,9 +186,9 @@ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int ii; @@ -899,7 +897,7 @@ Index: gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -321,7 +321,7 @@ ran_out_of_registers_for_arguments: +@@ -321,7 +321,7 @@ if ((argno < nargs) || argbytes) { @@ -908,11 +906,11 @@ Index: gdb-7.9.50.20150520/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.9.50.20150520/gdb/s390-linux-tdep.c +Index: gdb-7.10.50.20160106/gdb/s390-linux-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/s390-linux-tdep.c 2015-05-31 17:15:01.099868304 +0200 -+++ gdb-7.9.50.20150520/gdb/s390-linux-tdep.c 2015-05-31 17:16:13.285320769 +0200 -@@ -2463,7 +2463,7 @@ s390_function_arg_vector (struct type *t +--- gdb-7.10.50.20160106.orig/gdb/s390-linux-tdep.c 2016-01-08 19:16:16.632814213 +0100 ++++ gdb-7.10.50.20160106/gdb/s390-linux-tdep.c 2016-01-08 19:16:20.328834829 +0100 +@@ -2981,7 +2981,7 @@ /* Determine whether N is a power of two. */ static int @@ -921,7 +919,7 @@ Index: gdb-7.9.50.20150520/gdb/s390-linux-tdep.c { return n && ((n & (n - 1)) == 0); } -@@ -2520,7 +2520,7 @@ s390_handle_arg (struct s390_arg_state * +@@ -3038,7 +3038,7 @@ enum bfd_endian byte_order, int is_unnamed) { struct type *type = check_typedef (value_type (arg)); @@ -930,11 +928,11 @@ Index: gdb-7.9.50.20150520/gdb/s390-linux-tdep.c int write_mode = as->regcache != NULL; if (s390_function_arg_float (type)) -Index: gdb-7.9.50.20150520/gdb/score-tdep.c +Index: gdb-7.10.50.20160106/gdb/score-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/score-tdep.c 2015-05-31 17:15:01.100868311 +0200 -+++ gdb-7.9.50.20150520/gdb/score-tdep.c 2015-05-31 17:15:03.439882972 +0200 -@@ -514,7 +514,7 @@ score_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/score-tdep.c 2016-01-08 19:16:16.633814218 +0100 ++++ gdb-7.10.50.20160106/gdb/score-tdep.c 2016-01-08 19:16:20.328834829 +0100 +@@ -514,7 +514,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; int argreg; @@ -943,11 +941,11 @@ Index: gdb-7.9.50.20150520/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.9.50.20150520/gdb/sh-tdep.c +Index: gdb-7.10.50.20160106/gdb/sh-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/sh-tdep.c 2015-05-31 17:15:01.101868317 +0200 -+++ gdb-7.9.50.20150520/gdb/sh-tdep.c 2015-05-31 17:15:03.439882972 +0200 -@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc +--- gdb-7.10.50.20160106.orig/gdb/sh-tdep.c 2016-01-08 19:16:16.635814230 +0100 ++++ gdb-7.10.50.20160106/gdb/sh-tdep.c 2016-01-08 19:16:20.329834834 +0100 +@@ -805,7 +805,7 @@ static int sh_use_struct_convention (int renesas_abi, struct type *type) { @@ -956,7 +954,7 @@ Index: gdb-7.9.50.20150520/gdb/sh-tdep.c int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ -@@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore, +@@ -907,7 +907,7 @@ /* Helper function to justify value in register according to endianess. */ static const gdb_byte * @@ -965,7 +963,7 @@ Index: gdb-7.9.50.20150520/gdb/sh-tdep.c { static gdb_byte valbuf[4]; -@@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch * +@@ -1067,7 +1067,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -975,7 +973,7 @@ Index: gdb-7.9.50.20150520/gdb/sh-tdep.c int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; -@@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch +@@ -1208,7 +1209,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -985,11 +983,11 @@ Index: gdb-7.9.50.20150520/gdb/sh-tdep.c int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.9.50.20150520/gdb/sh64-tdep.c +Index: gdb-7.10.50.20160106/gdb/sh64-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/sh64-tdep.c 2015-05-31 17:15:01.102868323 +0200 -+++ gdb-7.9.50.20150520/gdb/sh64-tdep.c 2015-05-31 17:15:03.440882978 +0200 -@@ -1056,7 +1056,7 @@ sh64_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/sh64-tdep.c 2016-01-08 19:16:16.635814230 +0100 ++++ gdb-7.10.50.20160106/gdb/sh64-tdep.c 2016-01-08 19:16:20.329834834 +0100 +@@ -1056,7 +1056,7 @@ CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -998,7 +996,7 @@ Index: gdb-7.9.50.20150520/gdb/sh64-tdep.c int int_argreg; int float_argreg; int double_argreg; -@@ -1067,7 +1067,7 @@ sh64_push_dummy_call (struct gdbarch *gd +@@ -1067,7 +1067,7 @@ CORE_ADDR regval; const gdb_byte *val; gdb_byte valbuf[8]; @@ -1007,11 +1005,11 @@ Index: gdb-7.9.50.20150520/gdb/sh64-tdep.c int argreg_size; int fp_args[12]; -Index: gdb-7.9.50.20150520/gdb/sparc-tdep.c +Index: gdb-7.10.50.20160106/gdb/sparc-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/sparc-tdep.c 2015-05-31 17:15:01.103868329 +0200 -+++ gdb-7.9.50.20150520/gdb/sparc-tdep.c 2015-05-31 17:15:03.441882984 +0200 -@@ -525,7 +525,7 @@ sparc32_store_arguments (struct regcache +--- gdb-7.10.50.20160106.orig/gdb/sparc-tdep.c 2016-01-08 19:16:16.636814235 +0100 ++++ gdb-7.10.50.20160106/gdb/sparc-tdep.c 2016-01-08 19:16:20.330834840 +0100 +@@ -525,7 +525,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1020,11 +1018,11 @@ Index: gdb-7.9.50.20150520/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c +Index: gdb-7.10.50.20160106/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/sparc64-tdep.c 2015-05-31 17:15:01.104868336 +0200 -+++ gdb-7.9.50.20150520/gdb/sparc64-tdep.c 2015-05-31 17:15:03.441882984 +0200 -@@ -636,7 +636,8 @@ sparc64_16_byte_align_p (struct type *ty +--- gdb-7.10.50.20160106.orig/gdb/sparc64-tdep.c 2016-01-08 19:16:16.637814241 +0100 ++++ gdb-7.10.50.20160106/gdb/sparc64-tdep.c 2016-01-08 19:16:20.330834840 +0100 +@@ -636,7 +636,8 @@ static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -1034,7 +1032,7 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c { int len = TYPE_LENGTH (type); -@@ -678,7 +679,7 @@ sparc64_store_floating_fields (struct re +@@ -678,7 +679,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1043,7 +1041,7 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -710,7 +711,7 @@ sparc64_store_floating_fields (struct re +@@ -710,7 +711,7 @@ static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, @@ -1052,7 +1050,7 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c { if (sparc64_floating_p (type)) { -@@ -747,7 +748,7 @@ sparc64_extract_floating_fields (struct +@@ -747,7 +748,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1061,7 +1059,7 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -780,7 +781,7 @@ sparc64_store_arguments (struct regcache +@@ -780,7 +781,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1070,7 +1068,7 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -880,7 +881,7 @@ sparc64_store_arguments (struct regcache +@@ -880,7 +881,7 @@ { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -1079,11 +1077,11 @@ Index: gdb-7.9.50.20150520/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.9.50.20150520/gdb/spu-tdep.c +Index: gdb-7.10.50.20160106/gdb/spu-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/spu-tdep.c 2015-05-31 17:15:01.105868342 +0200 -+++ gdb-7.9.50.20150520/gdb/spu-tdep.c 2015-05-31 17:15:03.442882990 +0200 -@@ -1430,7 +1430,7 @@ spu_push_dummy_call (struct gdbarch *gdb +--- gdb-7.10.50.20160106.orig/gdb/spu-tdep.c 2016-01-08 19:16:16.638814246 +0100 ++++ gdb-7.10.50.20160106/gdb/spu-tdep.c 2016-01-08 19:16:20.331834845 +0100 +@@ -1429,7 +1429,7 @@ struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1092,7 +1090,7 @@ Index: gdb-7.9.50.20150520/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1462,7 +1462,7 @@ spu_push_dummy_call (struct gdbarch *gdb +@@ -1461,7 +1461,7 @@ { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1101,11 +1099,11 @@ Index: gdb-7.9.50.20150520/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.9.50.20150520/gdb/tic6x-tdep.c +Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/tic6x-tdep.c 2015-05-31 17:15:01.106868348 +0200 -+++ gdb-7.9.50.20150520/gdb/tic6x-tdep.c 2015-05-31 17:15:03.442882990 +0200 -@@ -895,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/tic6x-tdep.c 2016-01-08 19:16:16.639814252 +0100 ++++ gdb-7.10.50.20160106/gdb/tic6x-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -895,7 +895,7 @@ int argreg = 0; int argnum; int stack_offset = 4; @@ -1114,7 +1112,7 @@ Index: gdb-7.9.50.20150520/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); -@@ -929,7 +929,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -929,7 +929,7 @@ /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1123,7 +1121,7 @@ Index: gdb-7.9.50.20150520/gdb/tic6x-tdep.c if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; -@@ -948,7 +948,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -948,7 +948,7 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1132,7 +1130,7 @@ Index: gdb-7.9.50.20150520/gdb/tic6x-tdep.c enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); -@@ -1108,7 +1108,8 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -1108,7 +1108,8 @@ } else internal_error (__FILE__, __LINE__, @@ -1142,11 +1140,11 @@ Index: gdb-7.9.50.20150520/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.9.50.20150520/gdb/tilegx-tdep.c +Index: gdb-7.10.50.20160106/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/tilegx-tdep.c 2015-05-31 17:15:01.107868355 +0200 -+++ gdb-7.9.50.20150520/gdb/tilegx-tdep.c 2015-05-31 17:15:03.442882990 +0200 -@@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/tilegx-tdep.c 2016-01-08 19:16:16.640814257 +0100 ++++ gdb-7.10.50.20160106/gdb/tilegx-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -288,7 +288,7 @@ CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; @@ -1155,11 +1153,11 @@ Index: gdb-7.9.50.20150520/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.9.50.20150520/gdb/v850-tdep.c +Index: gdb-7.10.50.20160106/gdb/v850-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/v850-tdep.c 2015-05-31 17:15:01.107868355 +0200 -+++ gdb-7.9.50.20150520/gdb/v850-tdep.c 2015-05-31 17:15:03.443882997 +0200 -@@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/v850-tdep.c 2016-01-08 19:16:16.640814257 +0100 ++++ gdb-7.10.50.20160106/gdb/v850-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -1019,7 +1019,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; @@ -1168,7 +1166,7 @@ Index: gdb-7.9.50.20150520/gdb/v850-tdep.c int stack_offset; if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) -@@ -1047,7 +1047,7 @@ v850_push_dummy_call (struct gdbarch *gd +@@ -1047,7 +1047,7 @@ in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1177,11 +1175,11 @@ Index: gdb-7.9.50.20150520/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.9.50.20150520/gdb/vax-tdep.c +Index: gdb-7.10.50.20160106/gdb/vax-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/vax-tdep.c 2015-05-31 17:15:01.108868361 +0200 -+++ gdb-7.9.50.20150520/gdb/vax-tdep.c 2015-05-31 17:15:03.443882997 +0200 -@@ -111,7 +111,7 @@ vax_store_arguments (struct regcache *re +--- gdb-7.10.50.20160106.orig/gdb/vax-tdep.c 2016-01-08 19:16:16.641814263 +0100 ++++ gdb-7.10.50.20160106/gdb/vax-tdep.c 2016-01-08 19:16:20.333834856 +0100 +@@ -111,7 +111,7 @@ struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); gdb_byte buf[4]; @@ -1190,7 +1188,7 @@ Index: gdb-7.9.50.20150520/gdb/vax-tdep.c int i; /* We create an argument list on the stack, and make the argument -@@ -120,7 +120,7 @@ vax_store_arguments (struct regcache *re +@@ -120,7 +120,7 @@ /* Push arguments in reverse order. */ for (i = nargs - 1; i >= 0; i--) { @@ -1199,11 +1197,11 @@ Index: gdb-7.9.50.20150520/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.9.50.20150520/gdb/xstormy16-tdep.c +Index: gdb-7.10.50.20160106/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/xstormy16-tdep.c 2015-05-31 17:15:01.108868361 +0200 -+++ gdb-7.9.50.20150520/gdb/xstormy16-tdep.c 2015-05-31 17:15:03.443882997 +0200 -@@ -233,8 +233,9 @@ xstormy16_push_dummy_call (struct gdbarc +--- gdb-7.10.50.20160106.orig/gdb/xstormy16-tdep.c 2016-01-08 19:16:16.641814263 +0100 ++++ gdb-7.10.50.20160106/gdb/xstormy16-tdep.c 2016-01-08 19:16:20.333834856 +0100 +@@ -233,8 +233,9 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; int argreg = E_1ST_ARG_REGNUM; @@ -1215,11 +1213,11 @@ Index: gdb-7.9.50.20150520/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c +Index: gdb-7.10.50.20160106/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/xtensa-tdep.c 2015-05-31 17:15:01.110868373 +0200 -+++ gdb-7.9.50.20150520/gdb/xtensa-tdep.c 2015-05-31 17:15:03.444883003 +0200 -@@ -1646,8 +1646,7 @@ xtensa_store_return_value (struct type * +--- gdb-7.10.50.20160106.orig/gdb/xtensa-tdep.c 2016-01-08 19:16:16.643814274 +0100 ++++ gdb-7.10.50.20160106/gdb/xtensa-tdep.c 2016-01-08 19:16:20.334834862 +0100 +@@ -1638,8 +1638,7 @@ if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1229,7 +1227,7 @@ Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1721,18 +1720,18 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1713,18 +1712,18 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1251,7 +1249,7 @@ Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1756,9 +1755,10 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1748,9 +1747,10 @@ { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1265,7 +1263,7 @@ Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1828,8 +1828,8 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1820,8 +1820,8 @@ info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1275,7 +1273,7 @@ Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1874,7 +1874,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1866,7 +1866,7 @@ if (info->onstack) { @@ -1284,7 +1282,7 @@ Index: gdb-7.9.50.20150520/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1890,7 +1890,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1882,7 +1882,7 @@ } else { diff --git a/SOURCES/gdb-rhbz795424-bitpos-25of25.patch b/SOURCES/gdb-rhbz795424-bitpos-25of25.patch index 6fe684e..20db915 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-25of25.patch +++ b/SOURCES/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.8.50.20141228/gdb/f-lang.h +Index: gdb-7.10.50.20151027/gdb/f-lang.h =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/f-lang.h 2015-11-02 21:25:14.233161097 +0100 ++++ gdb-7.10.50.20151027/gdb/f-lang.h 2015-11-02 21:25:22.404214860 +0100 @@ -62,9 +62,9 @@ struct common_block struct symbol *contents[1]; }; @@ -63,11 +63,11 @@ Index: gdb-7.8.50.20141228/gdb/f-lang.h extern void f77_get_dynamic_array_length (struct type *); -Index: gdb-7.8.50.20141228/gdb/f-typeprint.c +Index: gdb-7.10.50.20151027/gdb/f-typeprint.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/f-typeprint.c 2015-11-02 21:25:14.234161104 +0100 ++++ gdb-7.10.50.20151027/gdb/f-typeprint.c 2015-11-02 21:25:22.404214860 +0100 +@@ -171,7 +171,7 @@ f_type_print_varspec_suffix (struct type int show, int passed_a_ptr, int demangled_args, int arrayprint_recurse_level) { @@ -76,7 +76,7 @@ Index: gdb-7.8.50.20141228/gdb/f-typeprint.c /* No static variables are permitted as an error call may occur during execution of this function. */ -@@ -192,7 +192,7 @@ f_type_print_varspec_suffix (struct type +@@ -204,7 +204,7 @@ f_type_print_varspec_suffix (struct type lower_bound = f77_get_lowerbound (type); if (lower_bound != 1) /* Not the default. */ @@ -85,7 +85,7 @@ Index: gdb-7.8.50.20141228/gdb/f-typeprint.c /* Make sure that, if we have an assumed size array, we print out a warning and print the upperbound as '*'. */ -@@ -202,7 +202,7 @@ f_type_print_varspec_suffix (struct type +@@ -214,7 +214,7 @@ f_type_print_varspec_suffix (struct type else { upper_bound = f77_get_upperbound (type); @@ -94,7 +94,7 @@ Index: gdb-7.8.50.20141228/gdb/f-typeprint.c } if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) -@@ -271,7 +271,7 @@ void +@@ -283,7 +283,7 @@ void f_type_print_base (struct type *type, struct ui_file *stream, int show, int level) { @@ -103,7 +103,7 @@ Index: gdb-7.8.50.20141228/gdb/f-typeprint.c int index; QUIT; -@@ -353,7 +353,7 @@ f_type_print_base (struct type *type, st +@@ -365,7 +365,7 @@ f_type_print_base (struct type *type, st else { upper_bound = f77_get_upperbound (type); @@ -112,10 +112,10 @@ Index: gdb-7.8.50.20141228/gdb/f-typeprint.c } break; -Index: gdb-7.8.50.20141228/gdb/f-valprint.c +Index: gdb-7.10.50.20151027/gdb/f-valprint.c =================================================================== ---- 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 +--- gdb-7.10.50.20151027.orig/gdb/f-valprint.c 2015-11-02 21:25:14.234161104 +0100 ++++ gdb-7.10.50.20151027/gdb/f-valprint.c 2015-11-02 21:25:22.405214867 +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. */ diff --git a/SOURCES/gdb-rhbz795424-bitpos-lazyvalue.patch b/SOURCES/gdb-rhbz795424-bitpos-lazyvalue.patch index 64e1565..31978ec 100644 --- a/SOURCES/gdb-rhbz795424-bitpos-lazyvalue.patch +++ b/SOURCES/gdb-rhbz795424-bitpos-lazyvalue.patch @@ -1,15 +1,19 @@ ---- gdb-7.5.0.20120926-m64/gdb/value.c-orig 2012-11-09 17:08:52.137406118 +0100 -+++ gdb-7.5.0.20120926-m64/gdb/value.c 2012-11-09 17:32:38.324199230 +0100 -@@ -663,7 +663,6 @@ allocate_value_lazy (struct type *type) +Index: gdb-7.10.50.20151022/gdb/value.c +=================================================================== +--- gdb-7.10.50.20151022.orig/gdb/value.c 2015-10-24 23:17:04.042143628 +0200 ++++ gdb-7.10.50.20151022/gdb/value.c 2015-10-24 23:17:27.687300689 +0200 +@@ -934,7 +934,6 @@ allocate_value_lazy (struct type *type) description correctly. */ check_typedef (type); - ulongest_fits_host_or_error (TYPE_LENGTH (type)); - val = (struct value *) xzalloc (sizeof (struct value)); + val = XCNEW (struct value); val->contents = NULL; val->next = all_values; ---- /dev/null 2012-10-18 11:08:13.202328239 +0200 -+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types-64bit.exp 2012-11-09 18:13:56.286587994 +0100 +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.exp 2015-10-24 23:17:04.042143628 +0200 @@ -0,0 +1,59 @@ +# This testcase is part of GDB, the GNU debugger. + @@ -70,8 +74,10 @@ +} + +test "native" ---- /dev/null 2012-10-18 11:08:13.202328239 +0200 -+++ ./gdb/testsuite/gdb.base/longest-types-64bit.c 2012-11-09 17:08:51.374406344 +0100 +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.c 2015-10-24 23:17:04.042143628 +0200 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -101,8 +107,10 @@ +{ + return 0; +} ---- /dev/null 2012-10-18 11:08:13.202328239 +0200 -+++ ./gdb/testsuite/gdb.base/longest-types-64bit.S 2012-11-09 17:51:37.597846130 +0100 +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.S +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.S 2015-10-24 23:17:04.042143628 +0200 @@ -0,0 +1,249 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -353,8 +361,10 @@ + .string "char" + .ident "GCC: (GNU) 4.7.3 20121109 (prerelease)" + .section .note.GNU-stack,"",@progbits ---- /dev/null 2012-10-18 11:08:13.202328239 +0200 -+++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu 2012-11-09 18:04:52.995692771 +0100 +Index: gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.50.20151022/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu 2015-10-24 23:17:04.042143628 +0200 @@ -0,0 +1,67 @@ +begin 755 gdb.base/longest-types-64bit.bz2 +M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_% diff --git a/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch b/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch index b2e0f85..30f44f6 100644 --- a/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +++ b/SOURCES/gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch @@ -1,7 +1,7 @@ -Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-rhbz947564.cc =================================================================== ---- /dev/null -+++ gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.cc +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-rhbz947564.cc 2016-02-15 23:39:21.791458927 +0100 @@ -0,0 +1,53 @@ +#include +#include @@ -56,10 +56,10 @@ Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.cc + + return 0; +} -Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-rhbz947564.exp =================================================================== ---- /dev/null -+++ gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.exp +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-rhbz947564.exp 2016-02-15 23:39:30.029517418 +0100 @@ -0,0 +1,75 @@ +# Copyright (C) 2013 Free Software Foundation, Inc. + @@ -78,7 +78,7 @@ Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.threads/tls-rhbz947564.exp + +set testfile tls-rhbz947564 +set srcfile ${testfile}.cc -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if [istarget "*-*-linux"] then { + set target_cflags "-D_MIT_POSIX_THREADS" diff --git a/SOURCES/gdb-rhel5-compat.patch b/SOURCES/gdb-rhel5-compat.patch deleted file mode 100644 index 645e4ae..0000000 --- a/SOURCES/gdb-rhel5-compat.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: gdb-7.7/gdb/linux-nat.c -=================================================================== ---- gdb-7.7.orig/gdb/linux-nat.c 2014-02-09 19:18:24.048554459 +0100 -+++ gdb-7.7/gdb/linux-nat.c 2014-02-09 19:19:22.210622806 +0100 -@@ -1529,8 +1529,22 @@ get_pending_status (struct lwp_info *lp, - gdb_signal_to_string (signo)); - } - -- if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped) -- *status = W_STOPCODE (SIGSTOP); -+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that -+ many TIDs are left unstopped). See RH Bug 496732. */ -+ if (ptid_get_pid (lp->ptid) == pid_was_stopped) -+ { -+ int err; -+ -+ errno = 0; -+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP); -+ if (debug_linux_nat) -+ { -+ fprintf_unfiltered (gdb_stdlog, -+ "SC: lwp kill %d %s\n", -+ err, -+ errno ? safe_strerror (errno) : "ERRNO-OK"); -+ } -+ } - - return 0; - } diff --git a/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch b/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch index e6e53bb..f153774 100644 --- a/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch +++ b/SOURCES/gdb-simultaneous-step-resume-breakpoint-test.patch @@ -1,5 +1,7 @@ ---- /dev/null 2009-09-25 12:44:54.497650251 +0200 -+++ ./gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp 2009-09-25 17:27:12.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.exp 2016-02-15 23:38:23.366044101 +0100 @@ -0,0 +1,65 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. + @@ -21,7 +23,7 @@ + +set testfile simultaneous-step-resume-breakpoint +set srcfile ${testfile}.c -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { + return -1 @@ -66,8 +68,10 @@ + +gdb_test "continue" "sleep-after.*" "second continue" +gdb_test "continue" "final-exit.*" "third continue" ---- /dev/null 2009-09-25 12:44:54.497650251 +0200 -+++ ./gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c 2009-09-25 17:29:42.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/simultaneous-step-resume-breakpoint.c 2016-02-15 23:38:18.257007826 +0100 @@ -0,0 +1,79 @@ +/* Copyright 2009 Free Software Foundation, Inc. + diff --git a/SOURCES/gdb-test-bt-cfi-without-die.patch b/SOURCES/gdb-test-bt-cfi-without-die.patch index 82f9d2d..fa3ab58 100644 --- a/SOURCES/gdb-test-bt-cfi-without-die.patch +++ b/SOURCES/gdb-test-bt-cfi-without-die.patch @@ -70,10 +70,10 @@ gdb/testsuite/ create mode 100644 gdb/testsuite/gdb.base/cfi-without-die-main.c create mode 100644 gdb/testsuite/gdb.base/cfi-without-die.exp -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-caller.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c 2014-02-06 19:35:23.485863819 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-caller.c 2016-01-08 21:10:15.498079587 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -103,10 +103,10 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c + /* Modify the return value to prevent any tail-call optimization. */ + return (*callback) () - one; +} -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-main.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c 2014-02-06 19:35:23.485863819 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-main.c 2016-01-08 21:10:15.498079587 +0100 @@ -0,0 +1,32 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -140,11 +140,11 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c +{ + return caller (callback); +} -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp 2014-02-06 20:26:00.775208847 +0100 -@@ -0,0 +1,67 @@ ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die.exp 2016-01-08 21:13:04.529998009 +0100 +@@ -0,0 +1,71 @@ +# Copyright 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -186,6 +186,10 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp +} +set test "verify unwinding breaks without CFI" +gdb_test_multiple "bt" $test { ++ -re " in \[?\]\[?\] .*\r\n$gdb_prompt $" { ++ # It may backtrace through some random frames even to main(). ++ pass $test ++ } + -re " in main .*\r\n$gdb_prompt $" { + fail $test + } diff --git a/SOURCES/gdb-test-expr-cumulative-archer.patch b/SOURCES/gdb-test-expr-cumulative-archer.patch index 232a527..dfaace7 100644 --- a/SOURCES/gdb-test-expr-cumulative-archer.patch +++ b/SOURCES/gdb-test-expr-cumulative-archer.patch @@ -1,8 +1,10 @@ archer archer-keiths-expr-cumulative b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc ---- /dev/null 2011-01-12 06:28:36.282000001 +0100 -+++ ./gdb/testsuite/gdb.cp/namespace-nested-imports.cc 2009-09-25 06:50:38.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-nested-imports.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-nested-imports.cc 2016-02-15 23:34:32.196402773 +0100 @@ -0,0 +1,36 @@ +namespace A +{ @@ -40,8 +42,10 @@ b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc + //ab; + return C::first(); +} ---- /dev/null 2011-01-12 06:28:36.282000001 +0100 -+++ ./gdb/testsuite/gdb.cp/namespace-nested-imports.exp 2009-09-25 06:50:38.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-nested-imports.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-nested-imports.exp 2016-02-15 23:34:51.926542859 +0100 @@ -0,0 +1,50 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -60,7 +64,7 @@ b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc + +set testfile namespace-nested-imports +set srcfile ${testfile}.cc -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { + untested "Couldn't compile test program" + return -1 @@ -93,8 +97,10 @@ b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc +gdb_continue_to_breakpoint "C::D::second" + +gdb_test "print ab" "= 11" ---- /dev/null 2011-01-12 06:28:36.282000001 +0100 -+++ ./gdb/testsuite/gdb.cp/namespace-no-imports.cc 2009-09-25 06:50:38.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-no-imports.cc +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-no-imports.cc 2016-02-15 23:34:32.196402773 +0100 @@ -0,0 +1,37 @@ + +namespace A @@ -133,8 +139,10 @@ b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc + A::B::C::abc; + return A::B::first(); +} ---- /dev/null 2011-01-12 06:28:36.282000001 +0100 -+++ ./gdb/testsuite/gdb.cp/namespace-no-imports.exp 2009-09-25 06:50:38.000000000 +0200 +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-no-imports.exp +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/namespace-no-imports.exp 2016-02-15 23:34:51.926542859 +0100 @@ -0,0 +1,69 @@ +# Copyright 2008 Free Software Foundation, Inc. + @@ -153,7 +161,7 @@ b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc + +set testfile namespace-no-imports +set srcfile ${testfile}.cc -+set binfile ${objdir}/${subdir}/${testfile} ++set binfile [standard_output_file ${testfile}] +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { + untested "Couldn't compile test program" + return -1 diff --git a/SOURCES/gdb-test-pid0-core.patch b/SOURCES/gdb-test-pid0-core.patch index c8675a3..5a18a99 100644 --- a/SOURCES/gdb-test-pid0-core.patch +++ b/SOURCES/gdb-test-pid0-core.patch @@ -6,10 +6,10 @@ http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html 2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu 2013-08-02 22:14:50.748990883 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu 2016-02-15 23:23:40.772772165 +0100 @@ -0,0 +1,20 @@ +begin 600 x86_64-pid0-core.core.bz2 +M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U @@ -31,10 +31,10 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2. +4B.Z!/,0-IZ^W_Q=R13A0D",CA>P` +` +end -Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp +Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp 2013-08-02 22:17:30.575209385 +0200 ++++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp 2016-02-15 23:23:55.145875704 +0100 @@ -0,0 +1,46 @@ +# This testcase is part of GDB, the GNU debugger. +# @@ -63,7 +63,7 @@ Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp + +set testfile "x86_64-pid0-core" +set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu -+set corefile ${objdir}/${subdir}/${testfile}.core ++set corefile [standard_output_file ${testfile}.core] + +if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} { + untested "failed uudecode or bzip2" diff --git a/SOURCES/gdb-testsuite-readline63-sigint.patch b/SOURCES/gdb-testsuite-readline63-sigint.patch new file mode 100644 index 0000000..f51503c --- /dev/null +++ b/SOURCES/gdb-testsuite-readline63-sigint.patch @@ -0,0 +1,39 @@ +gdb/users/ppalka/readline-7.0-update +commit 379059215e823555a37a8dc7e02cef8fd86566e4 +https://sourceware.org/ml/gdb-patches/2015-07/msg00422.html +Message-Id: <1436927724-4059-1-git-send-email-patrick@parcs.ath.cx> +https://bugzilla.redhat.com/show_bug.cgi?id=1301175 + +Index: gdb-7.10.50.20160131/gdb/testsuite/gdb.gdb/selftest.exp +=================================================================== +--- gdb-7.10.50.20160131.orig/gdb/testsuite/gdb.gdb/selftest.exp 2016-01-31 19:44:47.156963419 +0100 ++++ gdb-7.10.50.20160131/gdb/testsuite/gdb.gdb/selftest.exp 2016-01-31 19:45:11.245135173 +0100 +@@ -458,9 +458,25 @@ + } + + set description "send SIGINT signal to child process" +- gdb_test "signal SIGINT" \ +- "Continuing with signal SIGINT.*" \ +- "$description" ++ gdb_test_multiple "signal SIGINT" "$description" { ++ -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n" { ++ pass "$description" ++ } ++ } ++ ++ set description "send ^C to child process again" ++ send_gdb "\003" ++ gdb_expect { ++ -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" { ++ pass "$description" ++ } ++ -re ".*$gdb_prompt $" { ++ fail "$description" ++ } ++ timeout { ++ fail "$description (timeout)" ++ } ++ } + + # Switch back to the GDB thread if Guile support is linked in. + # "signal SIGINT" could also switch the current thread. diff --git a/SOURCES/gdb-upstream.patch b/SOURCES/gdb-upstream.patch new file mode 100644 index 0000000..c261e75 --- /dev/null +++ b/SOURCES/gdb-upstream.patch @@ -0,0 +1,2057 @@ +http://sourceware.org/ml/gdb-patches/2016-03/msg00013.html +Subject: [PATCH 1/2] Fix PR gdb/19676: Disable displaced stepping if /proc not mounted + +On GNU/Linux archs that support displaced stepping, if /proc is not +mounted, GDB gets stuck not able to step past breakpoints: + + (gdb) c + Continuing. + dl_main (phdr=, phnum=, user_entry=, auxv=) at rtld.c:2163 + 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); + Cannot find AT_ENTRY auxiliary vector entry. + (gdb) c + Continuing. + dl_main (phdr=, phnum=, user_entry=, auxv=) at rtld.c:2163 + 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); + Cannot find AT_ENTRY auxiliary vector entry. + (gdb) + +That's because GDB can't figure out where the scratch pad is. + +This is a regression introduced by the earlier changes to make the +Linux native target always work in non-stop mode. + +This commit makes GDB detect the case and fallback to stepping over +breakpoints in-line. + +gdb/ChangeLog: +2016-03-01 Pedro Alves + + PR gdb/19676 + * infrun.c (displaced_step_prepare): Also disable displaced + stepping on NOT_SUPPORTED_ERROR. + * linux-tdep.c (linux_displaced_step_location): If reading auxv + fails, throw NOT_SUPPORTED_ERROR instead of generic error. +--- + gdb/infrun.c | 3 ++- + gdb/linux-tdep.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gdb/infrun.c b/gdb/infrun.c +index 3e8c9e0..696105d 100644 +--- a/gdb/infrun.c ++++ b/gdb/infrun.c +@@ -1894,7 +1894,8 @@ displaced_step_prepare (ptid_t ptid) + { + struct displaced_step_inferior_state *displaced_state; + +- if (ex.error != MEMORY_ERROR) ++ if (ex.error != MEMORY_ERROR ++ && ex.error != NOT_SUPPORTED_ERROR) + throw_exception (ex); + + if (debug_infrun) +diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c +index 555c302..f197aa7 100644 +--- a/gdb/linux-tdep.c ++++ b/gdb/linux-tdep.c +@@ -2426,7 +2426,8 @@ linux_displaced_step_location (struct gdbarch *gdbarch) + location. The auxiliary vector gets us the PowerPC-side entry + point address instead. */ + if (target_auxv_search (¤t_target, AT_ENTRY, &addr) <= 0) +- error (_("Cannot find AT_ENTRY auxiliary vector entry.")); ++ throw_error (NOT_SUPPORTED_ERROR, ++ _("Cannot find AT_ENTRY auxiliary vector entry.")); + + /* Make certain that the address points at real code, and not a + function descriptor. */ +-- +2.5.0 + + + +http://sourceware.org/ml/gdb-patches/2016-03/msg00014.html +Subject: [PATCH 2/2] Fix PR gdb/19676: Internal error in linux-thread.db.c if /proc not mounted + +If /proc is not mounted, GDB fails an assertion in find_new_threads_once: + + Continuing. + /home/pedro/gdb/mygit/src/gdb/linux-thread-db.c:1249: internal-error: find_new_threads_once: Assertion `!target_has_execution' failed. + A problem internal to GDB has been detected, + further debugging may prove unreliable. + Quit this debugging session? (y or n) + +That was supposed to catch misuses of td_ta_thr_iter, which is unsafe +for live debugging. However, if /proc is not mounted, we still +fallback to using it. + +I didn't bother with a warning, because GDB already prints several +others related to failing to open /proc files. + +gdb/ChangeLog: +2016-03-01 Pedro Alves + + PR gdb/19676 + * linux-thread-db.c (try_thread_db_load_1): Leave + info->td_ta_thr_iter_p NULL iff debugging a live process and we + have /proc access. + (find_new_threads_once): Assert that we have a non-NULL + info->td_ta_thr_iter_p instead of checking whether the target has + execution. +--- + gdb/linux-thread-db.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 1eb457d..ce60beb 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -564,7 +564,6 @@ try_thread_db_load_1 (struct thread_db_info *info) + + /* These are essential. */ + CHK (TDB_VERBOSE_DLSYM (info, td_ta_map_lwp2thr)); +- CHK (TDB_VERBOSE_DLSYM (info, td_ta_thr_iter)); + CHK (TDB_VERBOSE_DLSYM (info, td_thr_validate)); + CHK (TDB_VERBOSE_DLSYM (info, td_thr_get_info)); + +@@ -572,10 +571,6 @@ try_thread_db_load_1 (struct thread_db_info *info) + TDB_DLSYM (info, td_thr_tls_get_addr); + TDB_DLSYM (info, td_thr_tlsbase); + +-#undef TDB_VERBOSE_DLSYM +-#undef TDB_DLSYM +-#undef CHK +- + /* It's best to avoid td_ta_thr_iter if possible. That walks data + structures in the inferior's address space that may be corrupted, + or, if the target is running, may change while we walk them. If +@@ -587,6 +582,15 @@ try_thread_db_load_1 (struct thread_db_info *info) + currently on core targets, as it uses ptrace directly. */ + if (target_has_execution + && linux_proc_task_list_dir_exists (ptid_get_pid (inferior_ptid))) ++ info->td_ta_thr_iter_p = NULL; ++ else ++ CHK (TDB_VERBOSE_DLSYM (info, td_ta_thr_iter)); ++ ++#undef TDB_VERBOSE_DLSYM ++#undef TDB_DLSYM ++#undef CHK ++ ++ if (info->td_ta_thr_iter_p == NULL) + { + struct lwp_info *lp; + int pid = ptid_get_pid (inferior_ptid); +@@ -1246,7 +1250,7 @@ find_new_threads_once (struct thread_db_info *info, int iteration, + data.new_threads = 0; + + /* See comment in thread_db_update_thread_list. */ +- gdb_assert (!target_has_execution); ++ gdb_assert (info->td_ta_thr_iter_p != NULL); + + TRY + { +-- +2.5.0 + + + +http://sourceware.org/ml/gdb-patches/2016-03/msg00246.html +Subject: [patch] Suggest running gdbserver for a PID in container + + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +Hi, + +currently + gdb -p +will print: + warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable + +BTW it is a bit lost in all the other messages. Full screen output is in: + https://sourceware.org/bugzilla/show_bug.cgi?id=19828 + +It correctly states the problem but it does not say how to solve it. + +Is at least this little suggestion OK? + +Originally I wanted to suggest also the Docker "-p 1234:1234" parameter but +I see the containers are more general topic than just Docker (even LxC etc.). + +According to Gary future GDBs should be able to work even without gdbserver. +But currently gdbserver is still required. + + +Thanks, +Jan + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/ChangeLog +2016-03-15 Jan Kratochvil + + * linux-thread-db.c (check_pid_namespace_match): Extend the message. + +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 1eb457d..21166bf 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -1020,7 +1020,8 @@ check_pid_namespace_match (void) + { + warning (_ ("Target and debugger are in different PID " + "namespaces; thread lists and other data are " +- "likely unreliable")); ++ "likely unreliable. " ++ "Connect to gdbserver inside the container.")); + } + } + } + +--azLHFNyN32YCQGCU-- + + + +commit fef3cb9f3aa84018d10866f89228ae3f23e5ca7e +Author: Jan Kratochvil +Date: Wed Apr 6 15:57:08 2016 +0200 + + Print the "file" command suggestion in exec_file_locate_attach + + currently: + $ gdbserver-7.9 :1234 true & + $ gdb -q -ex 'target remote :1234' # that -q is not relevant here + Remote debugging using :1234 + warning: Could not load vsyscall page because no executable was specified + try using the "file" command first. + 0x00007ffff7ddcc80 in ?? () + (gdb) b main + No symbol table is loaded. Use the "file" command. + Make breakpoint pending on future shared library load? (y or [n]) _ + + Provide more suggestive message to use the "file" command. + + gdb/ChangeLog + 2016-04-06 Jan Kratochvil + Pedro Alves + + * exec.c (exec_file_locate_attach): Print warning for unsupported + target_pid_to_exec_file. + * symfile-mem.c (add_vsyscall_page): Remove the "file" command + message part. + +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,11 @@ ++2016-04-06 Jan Kratochvil ++ Pedro Alves ++ ++ * exec.c (exec_file_locate_attach): Print warning for unsupported ++ target_pid_to_exec_file. ++ * symfile-mem.c (add_vsyscall_page): Remove the "file" command ++ message part. ++ + 2016-04-04 Simon Marchi + + * cli/cli-decode.c (help_cmd_list): Fix function doc and remove +--- a/gdb/exec.c ++++ b/gdb/exec.c +@@ -151,7 +151,13 @@ exec_file_locate_attach (int pid, int from_tty) + /* Try to determine a filename from the process itself. */ + exec_file = target_pid_to_exec_file (pid); + if (exec_file == NULL) +- return; ++ { ++ warning (_("No executable has been specified and target does not " ++ "support\n" ++ "determining executable automatically. " ++ "Try using the \"file\" command.")); ++ return; ++ } + + /* If gdb_sysroot is not empty and the discovered filename + is absolute then prefix the filename with gdb_sysroot. */ +--- a/gdb/symfile-mem.c ++++ b/gdb/symfile-mem.c +@@ -214,8 +214,7 @@ add_vsyscall_page (struct target_ops *target, int from_tty) + format should fix this. */ + { + warning (_("Could not load vsyscall page " +- "because no executable was specified\n" +- "try using the \"file\" command first.")); ++ "because no executable was specified")); + return; + } + args.bfd = bfd; + + + +commit 2ef34d11f61d79dcb152713aa059051d8cd3295d +Author: Markus Metzger +Date: Fri Feb 5 09:32:53 2016 +0100 + + btrace: fix PR gdb/19829 + + This is a backport of + + 33b4777ca1b7 btrace, frame: fix crash in get_frame_type + a038fa3e14a4 stack: check frame_unwind_caller_id + 2f3ef606b912 frame: add skip_tailcall_frames + + In skip_artificial_frames we repeatedly call get_prev_frame_always until we get + a non-inline and non-tailcall frame assuming that there must be such a frame + eventually. + + For record targets, however, we may have a frame chain that consists only of + artificial frames. This leads to a crash in get_frame_type when dereferencing a + NULL frame pointer. + + Change skip_artificial_frames and skip_tailcall_frames to return NULL in such a + case and modify each caller to cope with a NULL return. + + In frame_unwind_caller_pc and frame_unwind_caller_arch, we simply assert that + the returned value is not NULL. Their caller was supposed to check + frame_unwind_caller_id before calling those functions. + + In other cases, we thrown an error. + + In infcmd further move the skip_tailcall_frames call to the forward-stepping + case since we don't need a frame for reverse execution and we don't want to fail + because of that. Reverse-finish does make sense for a tailcall frame. + + gdb/ + * frame.h (skip_tailcall_frames): New. + * infcmd.c (finish_command): Call skip_tailcall_frames. + * frame.c (skip_artificial_frames): Return NULL if only artificial frames + are found. Update comment. + (frame_pop): Call skip_tailcall_frames. + (frame_unwind_caller_id): Handle NULL return. + (frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that + skip_artificial_frames does not return NULL. + (frame_pop): Add an error if only tailcall frames are found. + * infcmd.c (finish_command): Move skip_tailcall_frames call into forward- + execution case. Add an error if only tailcall frames are found. + * stack.c (frame_info): Check frame_unwind_caller_id. + + testsuite/ + * gdb.btrace/tailcall-only.exp: New. + * gdb.btrace/tailcall-only.c: New. + * gdb.btrace/x86_64-tailcall-only.S: New. + * gdb.btrace/i686-tailcall-only.S: New. + +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,19 @@ ++2016-03-17 Markus Metzger ++ ++ PR gdb/19829 ++ * frame.h (skip_tailcall_frames): New. ++ * infcmd.c (finish_command): Call skip_tailcall_frames. ++ * frame.c (skip_artificial_frames): Return NULL if only artificial ++ frames are found. Update comment. ++ (frame_pop): Call skip_tailcall_frames. ++ (frame_unwind_caller_id): Handle NULL return. ++ (frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that ++ skip_artificial_frames does not return NULL. ++ (frame_pop): Add an error if only tailcall frames are found. ++ * infcmd.c (finish_command): Move skip_tailcall_frames call into ++ forward-execution case. Add an error if only tailcall frames are found. ++ * stack.c (frame_info): Check frame_unwind_caller_id. ++ + 2016-03-15 Pedro Alves + + PR gdb/19676 +--- a/gdb/frame.c ++++ b/gdb/frame.c +@@ -420,7 +420,8 @@ fprint_frame (struct ui_file *file, struct frame_info *fi) + + /* Given FRAME, return the enclosing frame as found in real frames read-in from + inferior memory. Skip any previous frames which were made up by GDB. +- Return the original frame if no immediate previous frames exist. */ ++ Return FRAME if FRAME is a non-artificial frame. ++ Return NULL if FRAME is the start of an artificial-only chain. */ + + static struct frame_info * + skip_artificial_frames (struct frame_info *frame) +@@ -428,12 +429,34 @@ skip_artificial_frames (struct frame_info *frame) + /* Note we use get_prev_frame_always, and not get_prev_frame. The + latter will truncate the frame chain, leading to this function + unintentionally returning a null_frame_id (e.g., when the user +- sets a backtrace limit). This is safe, because as these frames +- are made up by GDB, there must be a real frame in the chain +- below. */ ++ sets a backtrace limit). ++ ++ Note that for record targets we may get a frame chain that consists ++ of artificial frames only. */ + while (get_frame_type (frame) == INLINE_FRAME + || get_frame_type (frame) == TAILCALL_FRAME) +- frame = get_prev_frame_always (frame); ++ { ++ frame = get_prev_frame_always (frame); ++ if (frame == NULL) ++ break; ++ } ++ ++ return frame; ++} ++ ++/* See frame.h. */ ++ ++struct frame_info * ++skip_tailcall_frames (struct frame_info *frame) ++{ ++ while (get_frame_type (frame) == TAILCALL_FRAME) ++ { ++ /* Note that for record targets we may get a frame chain that consists of ++ tailcall frames only. */ ++ frame = get_prev_frame (frame); ++ if (frame == NULL) ++ break; ++ } + + return frame; + } +@@ -496,6 +519,9 @@ frame_unwind_caller_id (struct frame_info *next_frame) + requests the frame ID of "main()"s caller. */ + + next_frame = skip_artificial_frames (next_frame); ++ if (next_frame == NULL) ++ return null_frame_id; ++ + this_frame = get_prev_frame_always (next_frame); + if (this_frame) + return get_frame_id (skip_artificial_frames (this_frame)); +@@ -869,7 +895,14 @@ frame_unwind_pc (struct frame_info *this_frame) + CORE_ADDR + frame_unwind_caller_pc (struct frame_info *this_frame) + { +- return frame_unwind_pc (skip_artificial_frames (this_frame)); ++ this_frame = skip_artificial_frames (this_frame); ++ ++ /* We must have a non-artificial frame. The caller is supposed to check ++ the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID ++ in this case. */ ++ gdb_assert (this_frame != NULL); ++ ++ return frame_unwind_pc (this_frame); + } + + int +@@ -972,8 +1005,10 @@ frame_pop (struct frame_info *this_frame) + + /* Ignore TAILCALL_FRAME type frames, they were executed already before + entering THISFRAME. */ +- while (get_frame_type (prev_frame) == TAILCALL_FRAME) +- prev_frame = get_prev_frame (prev_frame); ++ prev_frame = skip_tailcall_frames (prev_frame); ++ ++ if (prev_frame == NULL) ++ error (_("Cannot find the caller frame.")); + + /* Make a copy of all the register values unwound from this frame. + Save them in a scratch buffer so that there isn't a race between +@@ -2561,7 +2596,14 @@ frame_unwind_arch (struct frame_info *next_frame) + struct gdbarch * + frame_unwind_caller_arch (struct frame_info *next_frame) + { +- return frame_unwind_arch (skip_artificial_frames (next_frame)); ++ next_frame = skip_artificial_frames (next_frame); ++ ++ /* We must have a non-artificial frame. The caller is supposed to check ++ the result of frame_unwind_caller_id (), which returns NULL_FRAME_ID ++ in this case. */ ++ gdb_assert (next_frame != NULL); ++ ++ return frame_unwind_arch (next_frame); + } + + /* Gets the language of FRAME. */ +--- a/gdb/frame.h ++++ b/gdb/frame.h +@@ -820,5 +820,10 @@ extern int frame_unwinder_is (struct frame_info *fi, + + extern enum language get_frame_language (struct frame_info *frame); + ++/* Return the first non-tailcall frame above FRAME or FRAME if it is not a ++ tailcall frame. Return NULL if FRAME is the start of a tailcall-only ++ chain. */ ++ ++extern struct frame_info *skip_tailcall_frames (struct frame_info *frame); + + #endif /* !defined (FRAME_H) */ +--- a/gdb/infcmd.c ++++ b/gdb/infcmd.c +@@ -2000,11 +2000,6 @@ finish_command (char *arg, int from_tty) + return; + } + +- /* Ignore TAILCALL_FRAME type frames, they were executed already before +- entering THISFRAME. */ +- while (get_frame_type (frame) == TAILCALL_FRAME) +- frame = get_prev_frame (frame); +- + /* Find the function we will return from. */ + + sm->function = find_pc_function (get_frame_pc (get_selected_frame (NULL))); +@@ -2031,7 +2026,16 @@ finish_command (char *arg, int from_tty) + if (execution_direction == EXEC_REVERSE) + finish_backward (sm); + else +- finish_forward (sm, frame); ++ { ++ /* Ignore TAILCALL_FRAME type frames, they were executed already before ++ entering THISFRAME. */ ++ frame = skip_tailcall_frames (frame); ++ ++ if (frame == NULL) ++ error (_("Cannot find the caller frame.")); ++ ++ finish_forward (sm, frame); ++ } + } + + +--- a/gdb/stack.c ++++ b/gdb/stack.c +@@ -1509,27 +1509,32 @@ frame_info (char *addr_exp, int from_tty) + wrap_here (" "); + printf_filtered ("saved %s = ", pc_regname); + +- TRY +- { +- caller_pc = frame_unwind_caller_pc (fi); +- caller_pc_p = 1; +- } +- CATCH (ex, RETURN_MASK_ERROR) ++ if (!frame_id_p (frame_unwind_caller_id (fi))) ++ val_print_unavailable (gdb_stdout); ++ else + { +- switch (ex.error) ++ TRY + { +- case NOT_AVAILABLE_ERROR: +- val_print_unavailable (gdb_stdout); +- break; +- case OPTIMIZED_OUT_ERROR: +- val_print_not_saved (gdb_stdout); +- break; +- default: +- fprintf_filtered (gdb_stdout, _(""), ex.message); +- break; ++ caller_pc = frame_unwind_caller_pc (fi); ++ caller_pc_p = 1; + } ++ CATCH (ex, RETURN_MASK_ERROR) ++ { ++ switch (ex.error) ++ { ++ case NOT_AVAILABLE_ERROR: ++ val_print_unavailable (gdb_stdout); ++ break; ++ case OPTIMIZED_OUT_ERROR: ++ val_print_not_saved (gdb_stdout); ++ break; ++ default: ++ fprintf_filtered (gdb_stdout, _(""), ex.message); ++ break; ++ } ++ } ++ END_CATCH + } +- END_CATCH + + if (caller_pc_p) + fputs_filtered (paddress (gdbarch, caller_pc), gdb_stdout); +### a/gdb/testsuite/ChangeLog +### b/gdb/testsuite/ChangeLog +## -1,3 +1,11 @@ ++2016-03-17 Markus Metzger ++ ++ PR gdb/19829 ++ * gdb.btrace/tailcall-only.exp: New. ++ * gdb.btrace/tailcall-only.c: New. ++ * gdb.btrace/x86_64-tailcall-only.S: New. ++ * gdb.btrace/i686-tailcall-only.S: New. ++ + 2016-02-16 Don Breazeal + + PR remote/19496 +--- /dev/null ++++ b/gdb/testsuite/gdb.btrace/i686-tailcall-only.S +@@ -0,0 +1,447 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ ++ This file has been generated using: ++ gcc -m32 -march=i686 -S -O2 -dA -g tailcall-only.c -o i686-tailcall-only.S ++ */ ++ ++ .file "tailcall-only.c" ++ .text ++.Ltext0: ++ .p2align 4,,15 ++ .type bar_1, @function ++bar_1: ++.LFB0: ++ .file 1 "tailcall-only.c" ++ # tailcall-only.c:22 ++ .loc 1 22 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:24 ++ .loc 1 24 0 ++ movl $42, %eax ++# SUCC: EXIT [100.0%] ++ ret ++ .cfi_endproc ++.LFE0: ++ .size bar_1, .-bar_1 ++ .p2align 4,,15 ++ .type bar, @function ++bar: ++.LFB1: ++ # tailcall-only.c:28 ++ .loc 1 28 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:29 ++ .loc 1 29 0 ++ jmp bar_1 ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL0: ++ .cfi_endproc ++.LFE1: ++ .size bar, .-bar ++ .p2align 4,,15 ++ .type foo_1, @function ++foo_1: ++.LFB2: ++ # tailcall-only.c:34 ++ .loc 1 34 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:35 ++ .loc 1 35 0 ++ jmp bar ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL1: ++ .cfi_endproc ++.LFE2: ++ .size foo_1, .-foo_1 ++ .p2align 4,,15 ++ .type foo, @function ++foo: ++.LFB3: ++ # tailcall-only.c:40 ++ .loc 1 40 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:41 ++ .loc 1 41 0 ++ jmp foo_1 ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL2: ++ .cfi_endproc ++.LFE3: ++ .size foo, .-foo ++ .section .text.startup,"ax",@progbits ++ .p2align 4,,15 ++ .globl main ++ .type main, @function ++main: ++.LFB4: ++ # tailcall-only.c:46 ++ .loc 1 46 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:49 ++ .loc 1 49 0 ++ call foo ++.LVL3: ++ # tailcall-only.c:50 ++ .loc 1 50 0 ++ addl $1, %eax ++.LVL4: ++# SUCC: EXIT [100.0%] ++ # tailcall-only.c:53 ++ .loc 1 53 0 ++ ret ++ .cfi_endproc ++.LFE4: ++ .size main, .-main ++ .text ++.Letext0: ++ .section .debug_info,"",@progbits ++.Ldebug_info0: ++ .long 0xd5 # Length of Compilation Unit Info ++ .value 0x4 # DWARF version number ++ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section ++ .byte 0x4 # Pointer Size (in bytes) ++ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) ++ .long .LASF1 # DW_AT_producer: "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -m32 -march=i686 -g -O2" ++ .byte 0x1 # DW_AT_language ++ .long .LASF2 # DW_AT_name: "tailcall-only.c" ++ .long .LASF3 # DW_AT_comp_dir: "" ++ .long .Ldebug_ranges0+0 # DW_AT_ranges ++ .long 0 # DW_AT_low_pc ++ .long .Ldebug_line0 # DW_AT_stmt_list ++ .uleb128 0x2 # (DIE (0x25) DW_TAG_subprogram) ++ .long .LASF4 # DW_AT_name: "bar_1" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x15 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x3a # DW_AT_type ++ .long .LFB0 # DW_AT_low_pc ++ .long .LFE0-.LFB0 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .uleb128 0x3 # (DIE (0x3a) DW_TAG_base_type) ++ .byte 0x4 # DW_AT_byte_size ++ .byte 0x5 # DW_AT_encoding ++ .ascii "int\0" # DW_AT_name ++ .uleb128 0x4 # (DIE (0x41) DW_TAG_subprogram) ++ .ascii "bar\0" # DW_AT_name ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x1b # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x3a # DW_AT_type ++ .long .LFB1 # DW_AT_low_pc ++ .long .LFE1-.LFB1 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0x64 # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0x5a) DW_TAG_GNU_call_site) ++ .long .LVL0 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x25 # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0x41 ++ .uleb128 0x6 # (DIE (0x64) DW_TAG_subprogram) ++ .long .LASF0 # DW_AT_name: "foo_1" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x21 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x3a # DW_AT_type ++ .long .LFB2 # DW_AT_low_pc ++ .long .LFE2-.LFB2 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0x87 # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0x7d) DW_TAG_GNU_call_site) ++ .long .LVL1 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x41 # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0x64 ++ .uleb128 0x4 # (DIE (0x87) DW_TAG_subprogram) ++ .ascii "foo\0" # DW_AT_name ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x27 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x3a # DW_AT_type ++ .long .LFB3 # DW_AT_low_pc ++ .long .LFE3-.LFB3 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0xaa # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0xa0) DW_TAG_GNU_call_site) ++ .long .LVL2 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x64 # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0x87 ++ .uleb128 0x7 # (DIE (0xaa) DW_TAG_subprogram) ++ # DW_AT_external ++ .long .LASF5 # DW_AT_name: "main" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x2d # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x3a # DW_AT_type ++ .long .LFB4 # DW_AT_low_pc ++ .long .LFE4-.LFB4 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .uleb128 0x8 # (DIE (0xbf) DW_TAG_variable) ++ .long .LASF6 # DW_AT_name: "answer" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x2f # DW_AT_decl_line ++ .long 0x3a # DW_AT_type ++ .long .LLST0 # DW_AT_location ++ .uleb128 0x9 # (DIE (0xce) DW_TAG_GNU_call_site) ++ .long .LVL3 # DW_AT_low_pc ++ .long 0x87 # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0xaa ++ .byte 0 # end of children of DIE 0xb ++ .section .debug_abbrev,"",@progbits ++.Ldebug_abbrev0: ++ .uleb128 0x1 # (abbrev code) ++ .uleb128 0x11 # (TAG: DW_TAG_compile_unit) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x25 # (DW_AT_producer) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x13 # (DW_AT_language) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x1b # (DW_AT_comp_dir) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x55 # (DW_AT_ranges) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x10 # (DW_AT_stmt_list) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x2 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0 # DW_children_no ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x6 # (DW_FORM_data4) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x3 # (abbrev code) ++ .uleb128 0x24 # (TAG: DW_TAG_base_type) ++ .byte 0 # DW_children_no ++ .uleb128 0xb # (DW_AT_byte_size) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3e # (DW_AT_encoding) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0x8 # (DW_FORM_string) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x4 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0x8 # (DW_FORM_string) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x6 # (DW_FORM_data4) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x1 # (DW_AT_sibling) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x5 # (abbrev code) ++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site) ++ .byte 0 # DW_children_no ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x2115 # (DW_AT_GNU_tail_call) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x31 # (DW_AT_abstract_origin) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x6 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x6 # (DW_FORM_data4) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x1 # (DW_AT_sibling) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x7 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3f # (DW_AT_external) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x6 # (DW_FORM_data4) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x8 # (abbrev code) ++ .uleb128 0x34 # (TAG: DW_TAG_variable) ++ .byte 0 # DW_children_no ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x2 # (DW_AT_location) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x9 # (abbrev code) ++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site) ++ .byte 0 # DW_children_no ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x31 # (DW_AT_abstract_origin) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .byte 0 ++ .section .debug_loc,"",@progbits ++.Ldebug_loc0: ++.LLST0: ++ .long .LVL3 # Location list begin address (*.LLST0) ++ .long .LVL4 # Location list end address (*.LLST0) ++ .value 0x3 # Location expression size ++ .byte 0x70 # DW_OP_breg0 ++ .sleb128 1 ++ .byte 0x9f # DW_OP_stack_value ++ .long .LVL4 # Location list begin address (*.LLST0) ++ .long .LFE4 # Location list end address (*.LLST0) ++ .value 0x1 # Location expression size ++ .byte 0x50 # DW_OP_reg0 ++ .long 0 # Location list terminator begin (*.LLST0) ++ .long 0 # Location list terminator end (*.LLST0) ++ .section .debug_aranges,"",@progbits ++ .long 0x24 # Length of Address Ranges Info ++ .value 0x2 # DWARF Version ++ .long .Ldebug_info0 # Offset of Compilation Unit Info ++ .byte 0x4 # Size of Address ++ .byte 0 # Size of Segment Descriptor ++ .value 0 # Pad to 8 byte boundary ++ .value 0 ++ .long .Ltext0 # Address ++ .long .Letext0-.Ltext0 # Length ++ .long .LFB4 # Address ++ .long .LFE4-.LFB4 # Length ++ .long 0 ++ .long 0 ++ .section .debug_ranges,"",@progbits ++.Ldebug_ranges0: ++ .long .Ltext0 # Offset 0 ++ .long .Letext0 ++ .long .LFB4 # Offset 0x8 ++ .long .LFE4 ++ .long 0 ++ .long 0 ++ .section .debug_line,"",@progbits ++.Ldebug_line0: ++ .section .debug_str,"MS",@progbits,1 ++.LASF4: ++ .string "bar_1" ++.LASF2: ++ .string "tailcall-only.c" ++.LASF1: ++ .string "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -m32 -march=i686 -g -O2" ++.LASF6: ++ .string "answer" ++.LASF5: ++ .string "main" ++.LASF3: ++ .string "" ++.LASF0: ++ .string "foo_1" ++ .ident "GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)" ++ .section .note.GNU-stack,"",@progbits +--- /dev/null ++++ b/gdb/testsuite/gdb.btrace/tailcall-only.c +@@ -0,0 +1,53 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 Free Software Foundation, Inc. ++ ++ Contributed by Intel Corp. ++ ++ 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 . */ ++ ++static __attribute__ ((noinline)) int ++bar_1 (void) ++{ ++ return 42; ++} ++ ++static __attribute__ ((noinline)) int ++bar (void) ++{ ++ return bar_1 (); ++} ++ ++static __attribute__ ((noinline)) int ++foo_1 (void) ++{ ++ return bar (); ++} ++ ++static __attribute__ ((noinline)) int ++foo (void) ++{ ++ return foo_1 (); ++} ++ ++int ++main (void) ++{ ++ int answer; ++ ++ answer = foo (); ++ answer += 1; ++ ++ return answer; ++} +--- /dev/null ++++ b/gdb/testsuite/gdb.btrace/tailcall-only.exp +@@ -0,0 +1,97 @@ ++# This testcase is part of GDB, the GNU debugger. ++# ++# Copyright 2016 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 is a variant of tailcall.exp where the entire trace contains only tail ++# calls. This used to cause a crash in get_frame_type. ++# ++ ++# check for btrace support ++if { [skip_btrace_tests] } { return -1 } ++ ++# This test requires the compiler to generate a tail call. To guarantee that ++# we always get one, we use an assembly source file. ++# ++# We use different assembly sources based on the target architecture. ++# ++# Luckily, they are similar enough that a single test script can handle ++# both. ++set opts {} ++if [info exists COMPILE] { ++ # make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1" ++ standard_testfile tailcall-only.c ++ lappend opts debug optimize=-O2 ++} elseif {[istarget "x86_64-*-*"]} { ++ standard_testfile x86_64-tailcall-only.S ++} elseif {[istarget "i?86-*-*"]} { ++ standard_testfile i686-tailcall-only.S ++} else { ++ verbose "Skipping ${testfile}." ++ return ++} ++ ++if [prepare_for_testing tailcall-only.exp $testfile $srcfile $opts] { ++ return -1 ++} ++if ![runto_main] { ++ return -1 ++} ++ ++# we want to see the full trace for this test ++gdb_test_no_output "set record function-call-history-size 0" ++ ++# trace foo ++gdb_test "step" ".*" "prepare for recording" ++gdb_test_no_output "record btrace" ++gdb_test "stepi 4" ".*" "record branch trace" ++ ++# for debugging ++gdb_test "info record" ".*" ++ ++# show the branch trace with calls indented ++gdb_test "record function-call-history /c 1" [multi_line \ ++ "1\tfoo" \ ++ "2\t foo_1" \ ++ "3\t bar" \ ++ "4\t bar_1" ++ ] "function-call-history" ++ ++# We can step ++gdb_test "record goto begin" ".*foo.*" ++gdb_test "stepi" ".*foo_1.*" "step into foo_1" ++gdb_test "step" ".*bar.*" "step into bar" ++gdb_test "stepi" ".*bar_1.*" "step into bar_1" ++ ++# We can neither finish nor return. ++gdb_test "finish" "Cannot find the caller frame.*" ++gdb_test_multiple "return" "return" { ++ -re "Make .* return now.*y or n. $" { ++ send_gdb "y\n" ++ exp_continue ++ } ++ -re "Cannot find the caller frame.*$gdb_prompt $" { ++ pass "return" ++ } ++} ++ ++# But we can reverse-finish ++gdb_test "reverse-finish" ".*bar.*" ++gdb_test "reverse-step" ".*foo_1.*" ++ ++# Info frame isn't useful but doesn't crash as it used to. ++gdb_test "up" ".*foo.*" ++gdb_test "info frame" ".*" +--- /dev/null ++++ b/gdb/testsuite/gdb.btrace/x86_64-tailcall-only.S +@@ -0,0 +1,446 @@ ++/* This testcase is part of GDB, the GNU debugger. ++ ++ Copyright 2016 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ ++ This file has been generated using: ++ gcc -S -O2 -dA -g tailcall-only.c -o x86_64-tailcall-only.S */ ++ ++ .file "tailcall-only.c" ++ .text ++.Ltext0: ++ .p2align 4,,15 ++ .type bar_1, @function ++bar_1: ++.LFB0: ++ .file 1 "tailcall-only.c" ++ # tailcall-only.c:22 ++ .loc 1 22 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:24 ++ .loc 1 24 0 ++ movl $42, %eax ++# SUCC: EXIT [100.0%] ++ ret ++ .cfi_endproc ++.LFE0: ++ .size bar_1, .-bar_1 ++ .p2align 4,,15 ++ .type bar, @function ++bar: ++.LFB1: ++ # tailcall-only.c:28 ++ .loc 1 28 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:29 ++ .loc 1 29 0 ++ jmp bar_1 ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL0: ++ .cfi_endproc ++.LFE1: ++ .size bar, .-bar ++ .p2align 4,,15 ++ .type foo_1, @function ++foo_1: ++.LFB2: ++ # tailcall-only.c:34 ++ .loc 1 34 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:35 ++ .loc 1 35 0 ++ jmp bar ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL1: ++ .cfi_endproc ++.LFE2: ++ .size foo_1, .-foo_1 ++ .p2align 4,,15 ++ .type foo, @function ++foo: ++.LFB3: ++ # tailcall-only.c:40 ++ .loc 1 40 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:41 ++ .loc 1 41 0 ++ jmp foo_1 ++# SUCC: EXIT [100.0%] (ABNORMAL,SIBCALL) ++.LVL2: ++ .cfi_endproc ++.LFE3: ++ .size foo, .-foo ++ .section .text.startup,"ax",@progbits ++ .p2align 4,,15 ++ .globl main ++ .type main, @function ++main: ++.LFB4: ++ # tailcall-only.c:46 ++ .loc 1 46 0 ++ .cfi_startproc ++# BLOCK 2 freq:10000 seq:0 ++# PRED: ENTRY [100.0%] (FALLTHRU) ++ # tailcall-only.c:49 ++ .loc 1 49 0 ++ call foo ++.LVL3: ++ # tailcall-only.c:50 ++ .loc 1 50 0 ++ addl $1, %eax ++.LVL4: ++# SUCC: EXIT [100.0%] ++ # tailcall-only.c:53 ++ .loc 1 53 0 ++ ret ++ .cfi_endproc ++.LFE4: ++ .size main, .-main ++ .text ++.Letext0: ++ .section .debug_info,"",@progbits ++.Ldebug_info0: ++ .long 0x111 # Length of Compilation Unit Info ++ .value 0x4 # DWARF version number ++ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section ++ .byte 0x8 # Pointer Size (in bytes) ++ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit) ++ .long .LASF1 # DW_AT_producer: "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2" ++ .byte 0x1 # DW_AT_language ++ .long .LASF2 # DW_AT_name: "tailcall-only.c" ++ .long .LASF3 # DW_AT_comp_dir: "" ++ .long .Ldebug_ranges0+0 # DW_AT_ranges ++ .quad 0 # DW_AT_low_pc ++ .long .Ldebug_line0 # DW_AT_stmt_list ++ .uleb128 0x2 # (DIE (0x29) DW_TAG_subprogram) ++ .long .LASF4 # DW_AT_name: "bar_1" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x15 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x46 # DW_AT_type ++ .quad .LFB0 # DW_AT_low_pc ++ .quad .LFE0-.LFB0 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .uleb128 0x3 # (DIE (0x46) DW_TAG_base_type) ++ .byte 0x4 # DW_AT_byte_size ++ .byte 0x5 # DW_AT_encoding ++ .ascii "int\0" # DW_AT_name ++ .uleb128 0x4 # (DIE (0x4d) DW_TAG_subprogram) ++ .ascii "bar\0" # DW_AT_name ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x1b # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x46 # DW_AT_type ++ .quad .LFB1 # DW_AT_low_pc ++ .quad .LFE1-.LFB1 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0x7c # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0x6e) DW_TAG_GNU_call_site) ++ .quad .LVL0 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x29 # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0x4d ++ .uleb128 0x6 # (DIE (0x7c) DW_TAG_subprogram) ++ .long .LASF0 # DW_AT_name: "foo_1" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x21 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x46 # DW_AT_type ++ .quad .LFB2 # DW_AT_low_pc ++ .quad .LFE2-.LFB2 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0xab # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0x9d) DW_TAG_GNU_call_site) ++ .quad .LVL1 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x4d # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0x7c ++ .uleb128 0x4 # (DIE (0xab) DW_TAG_subprogram) ++ .ascii "foo\0" # DW_AT_name ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x27 # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x46 # DW_AT_type ++ .quad .LFB3 # DW_AT_low_pc ++ .quad .LFE3-.LFB3 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .long 0xda # DW_AT_sibling ++ .uleb128 0x5 # (DIE (0xcc) DW_TAG_GNU_call_site) ++ .quad .LVL2 # DW_AT_low_pc ++ # DW_AT_GNU_tail_call ++ .long 0x7c # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0xab ++ .uleb128 0x7 # (DIE (0xda) DW_TAG_subprogram) ++ # DW_AT_external ++ .long .LASF5 # DW_AT_name: "main" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x2d # DW_AT_decl_line ++ # DW_AT_prototyped ++ .long 0x46 # DW_AT_type ++ .quad .LFB4 # DW_AT_low_pc ++ .quad .LFE4-.LFB4 # DW_AT_high_pc ++ .uleb128 0x1 # DW_AT_frame_base ++ .byte 0x9c # DW_OP_call_frame_cfa ++ # DW_AT_GNU_all_call_sites ++ .uleb128 0x8 # (DIE (0xf7) DW_TAG_variable) ++ .long .LASF6 # DW_AT_name: "answer" ++ .byte 0x1 # DW_AT_decl_file (tailcall-only.c) ++ .byte 0x2f # DW_AT_decl_line ++ .long 0x46 # DW_AT_type ++ .long .LLST0 # DW_AT_location ++ .uleb128 0x9 # (DIE (0x106) DW_TAG_GNU_call_site) ++ .quad .LVL3 # DW_AT_low_pc ++ .long 0xab # DW_AT_abstract_origin ++ .byte 0 # end of children of DIE 0xda ++ .byte 0 # end of children of DIE 0xb ++ .section .debug_abbrev,"",@progbits ++.Ldebug_abbrev0: ++ .uleb128 0x1 # (abbrev code) ++ .uleb128 0x11 # (TAG: DW_TAG_compile_unit) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x25 # (DW_AT_producer) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x13 # (DW_AT_language) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x1b # (DW_AT_comp_dir) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x55 # (DW_AT_ranges) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x10 # (DW_AT_stmt_list) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x2 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0 # DW_children_no ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x7 # (DW_FORM_data8) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x3 # (abbrev code) ++ .uleb128 0x24 # (TAG: DW_TAG_base_type) ++ .byte 0 # DW_children_no ++ .uleb128 0xb # (DW_AT_byte_size) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3e # (DW_AT_encoding) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0x8 # (DW_FORM_string) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x4 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0x8 # (DW_FORM_string) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x7 # (DW_FORM_data8) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x1 # (DW_AT_sibling) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x5 # (abbrev code) ++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site) ++ .byte 0 # DW_children_no ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x2115 # (DW_AT_GNU_tail_call) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x31 # (DW_AT_abstract_origin) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x6 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x7 # (DW_FORM_data8) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x1 # (DW_AT_sibling) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x7 # (abbrev code) ++ .uleb128 0x2e # (TAG: DW_TAG_subprogram) ++ .byte 0x1 # DW_children_yes ++ .uleb128 0x3f # (DW_AT_external) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x27 # (DW_AT_prototyped) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x12 # (DW_AT_high_pc) ++ .uleb128 0x7 # (DW_FORM_data8) ++ .uleb128 0x40 # (DW_AT_frame_base) ++ .uleb128 0x18 # (DW_FORM_exprloc) ++ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites) ++ .uleb128 0x19 # (DW_FORM_flag_present) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x8 # (abbrev code) ++ .uleb128 0x34 # (TAG: DW_TAG_variable) ++ .byte 0 # DW_children_no ++ .uleb128 0x3 # (DW_AT_name) ++ .uleb128 0xe # (DW_FORM_strp) ++ .uleb128 0x3a # (DW_AT_decl_file) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x3b # (DW_AT_decl_line) ++ .uleb128 0xb # (DW_FORM_data1) ++ .uleb128 0x49 # (DW_AT_type) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .uleb128 0x2 # (DW_AT_location) ++ .uleb128 0x17 # (DW_FORM_sec_offset) ++ .byte 0 ++ .byte 0 ++ .uleb128 0x9 # (abbrev code) ++ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site) ++ .byte 0 # DW_children_no ++ .uleb128 0x11 # (DW_AT_low_pc) ++ .uleb128 0x1 # (DW_FORM_addr) ++ .uleb128 0x31 # (DW_AT_abstract_origin) ++ .uleb128 0x13 # (DW_FORM_ref4) ++ .byte 0 ++ .byte 0 ++ .byte 0 ++ .section .debug_loc,"",@progbits ++.Ldebug_loc0: ++.LLST0: ++ .quad .LVL3 # Location list begin address (*.LLST0) ++ .quad .LVL4 # Location list end address (*.LLST0) ++ .value 0x3 # Location expression size ++ .byte 0x70 # DW_OP_breg0 ++ .sleb128 1 ++ .byte 0x9f # DW_OP_stack_value ++ .quad .LVL4 # Location list begin address (*.LLST0) ++ .quad .LFE4 # Location list end address (*.LLST0) ++ .value 0x1 # Location expression size ++ .byte 0x50 # DW_OP_reg0 ++ .quad 0 # Location list terminator begin (*.LLST0) ++ .quad 0 # Location list terminator end (*.LLST0) ++ .section .debug_aranges,"",@progbits ++ .long 0x3c # Length of Address Ranges Info ++ .value 0x2 # DWARF Version ++ .long .Ldebug_info0 # Offset of Compilation Unit Info ++ .byte 0x8 # Size of Address ++ .byte 0 # Size of Segment Descriptor ++ .value 0 # Pad to 16 byte boundary ++ .value 0 ++ .quad .Ltext0 # Address ++ .quad .Letext0-.Ltext0 # Length ++ .quad .LFB4 # Address ++ .quad .LFE4-.LFB4 # Length ++ .quad 0 ++ .quad 0 ++ .section .debug_ranges,"",@progbits ++.Ldebug_ranges0: ++ .quad .Ltext0 # Offset 0 ++ .quad .Letext0 ++ .quad .LFB4 # Offset 0x10 ++ .quad .LFE4 ++ .quad 0 ++ .quad 0 ++ .section .debug_line,"",@progbits ++.Ldebug_line0: ++ .section .debug_str,"MS",@progbits,1 ++.LASF4: ++ .string "bar_1" ++.LASF2: ++ .string "tailcall-only.c" ++.LASF1: ++ .string "GNU C 4.8.3 20140911 (Red Hat 4.8.3-9) -mtune=generic -march=x86-64 -g -O2" ++.LASF6: ++ .string "answer" ++.LASF5: ++ .string "main" ++.LASF3: ++ .string "" ++.LASF0: ++ .string "foo_1" ++ .ident "GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)" ++ .section .note.GNU-stack,"",@progbits + + + +commit cd64cabb8c66a5565fc33bf66a07c08bc767e413 +Author: Yichao Yu +Date: Thu Mar 31 19:28:47 2016 +0100 + + Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach + + Ref: https://sourceware.org/ml/gdb/2016-03/msg00023.html + + GDB currently fails to fetch the list of already-registered JIT + modules on attach. + + Nothing is calling jit_inferior_init, which is what is responsible for + walking the JIT object list at init time. + + Despite the misleading naming, jit_inferior_created_hook -> + jit_inferior_init is only called when the inferior execs. + + This regressed with the fix for PR gdb/13431 (03bef283c2d3): + https://sourceware.org/ml/gdb-patches/2012-02/msg00023.html which + removed the inferior_created (jit_inferior_created_observer) + observer. + + Adding an inferior_created observer back fixes the issue. + + In turn, this exposes a bug in jit_breakpoint_re_set_internal as well, + which is returning the wrong result when we already have the + breakpoint at the right address. + + gdb/ChangeLog: + 2016-03-31 Yichao Yu + + PR gdb/19858 + * jit.c (jit_breakpoint_re_set_internal): Return 0 if we already + got the breakpoint at the right address. + (jit_inferior_created): New function. + (_initialize_jit): Install jit_inferior_created as + inferior_created observer. + + Signed-off-by: Pedro Alves + +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,12 @@ ++2016-03-31 Yichao Yu ++ ++ PR gdb/19858 ++ * jit.c (jit_breakpoint_re_set_internal): Return 0 if we already ++ got the breakpoint at the right address. ++ (jit_inferior_created): New function. ++ (_initialize_jit): Install jit_inferior_created as ++ inferior_created observer. ++ + 2016-03-17 Markus Metzger + + PR gdb/19829 +--- a/gdb/jit.c ++++ b/gdb/jit.c +@@ -1026,7 +1026,7 @@ jit_breakpoint_deleted (struct breakpoint *b) + } + + /* (Re-)Initialize the jit breakpoint if necessary. +- Return 0 on success. */ ++ Return 0 if the jit breakpoint has been successfully initialized. */ + + static int + jit_breakpoint_re_set_internal (struct gdbarch *gdbarch, +@@ -1070,7 +1070,7 @@ jit_breakpoint_re_set_internal (struct gdbarch *gdbarch, + paddress (gdbarch, addr)); + + if (ps_data->cached_code_address == addr) +- return 1; ++ return 0; + + /* Delete the old breakpoint. */ + if (ps_data->jit_breakpoint != NULL) +@@ -1367,6 +1367,14 @@ jit_inferior_init (struct gdbarch *gdbarch) + } + } + ++/* inferior_created observer. */ ++ ++static void ++jit_inferior_created (struct target_ops *ops, int from_tty) ++{ ++ jit_inferior_created_hook (); ++} ++ + /* Exported routine to call when an inferior has been created. */ + + void +@@ -1496,6 +1504,7 @@ _initialize_jit (void) + show_jit_debug, + &setdebuglist, &showdebuglist); + ++ observer_attach_inferior_created (jit_inferior_created); + observer_attach_inferior_exit (jit_inferior_exit_hook); + observer_attach_breakpoint_deleted (jit_breakpoint_deleted); + + + + +commit 89df5d6cce0e91c4b34c7a62ba4a68756a8ed4e7 +Author: Pedro Alves +Date: Thu Mar 31 19:28:47 2016 +0100 + + Make gdb.base/jit.exp binaries unique + + This testcase compiles the same program and library differently + multiple times using the same file names. Make them unique, to make + it easier to debug test problems. + + gdb/testsuite/ChangeLog: + 2016-03-31 Pedro Alves + + PR gdb/19858 + * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add + BINSUFFIX parameter, and handle it. + (top level): Adjust calls compile_jit_test. + +### a/gdb/testsuite/ChangeLog +### b/gdb/testsuite/ChangeLog +## -1,3 +1,10 @@ ++2016-03-31 Pedro Alves ++ ++ PR gdb/19858 ++ * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add ++ BINSUFFIX parameter, and handle it. ++ (top level): Adjust calls compile_jit_test. ++ + 2016-03-17 Markus Metzger + + PR gdb/19829 +--- a/gdb/testsuite/gdb.base/jit.exp ++++ b/gdb/testsuite/gdb.base/jit.exp +@@ -24,18 +24,19 @@ if {[get_compiler_info]} { + return 1 + } + +-# +-# test running programs +-# ++# Compile the testcase program and library. BINSUFFIX is the suffix ++# to append to the program and library filenames, to make them unique ++# between invocations. OPTIONS is passed to gdb_compile when ++# compiling the program. + +-proc compile_jit_test {testname options} { ++proc compile_jit_test {testname binsuffix options} { + global testfile srcfile binfile srcdir subdir + global solib_testfile solib_srcfile solib_binfile solib_binfile_test_msg + global solib_binfile_target + + set testfile jit-main + set srcfile ${testfile}.c +- set binfile [standard_output_file $testfile] ++ set binfile [standard_output_file $testfile$binsuffix] + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ + executable [concat debug $options]] != "" } { + untested $testname +@@ -44,8 +45,8 @@ proc compile_jit_test {testname options} { + + set solib_testfile "jit-solib" + set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c" +- set solib_binfile [standard_output_file ${solib_testfile}.so] +- set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so" ++ set solib_binfile [standard_output_file ${solib_testfile}$binsuffix.so] ++ set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}$binsuffix.so" + + # Note: compiling without debug info: the library goes through + # symbol renaming by munging on its symbol table, and that +@@ -109,7 +110,7 @@ proc one_jit_test {count match_str} { + } + } + +-if {[compile_jit_test jit.exp {}] < 0} { ++if {[compile_jit_test jit.exp "" {}] < 0} { + return + } + one_jit_test 1 "${hex} jit_function_0000" +@@ -117,7 +118,7 @@ one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" + + with_test_prefix PIE { + if {[compile_jit_test "jit.exp PIE tests" \ +- {additional_flags=-fPIE ldflags=-pie}] < 0} { ++ "-pie" {additional_flags=-fPIE ldflags=-pie}] < 0} { + return + } + + + + +commit 85af34ee0211eedf8d30a5c44dfc59dddf8b512a +Author: Pedro Alves +Date: Thu Mar 31 19:28:47 2016 +0100 + + Add regression test for PR gdb/19858 (JIT code registration on attach) + + This test would fail without the previous gdb/jit.c fix: + + (gdb) attach 23031 + Attaching to program: .../build/gdb/testsuite/outputs/gdb.base/jit/jit-main, process 23031 + [...] + 207 WAIT_FOR_GDB; i = 0; /* gdb break here 1 */ + (gdb) PASS: gdb.base/jit.exp: attach: one_jit_test-2: attach + set var wait_for_gdb = 0 + (gdb) PASS: gdb.base/jit.exp: attach: one_jit_test-2: set var wait_for_gdb = 0 + info function ^jit_function + All functions matching regular expression "^jit_function": + (gdb) FAIL: gdb.base/jit.exp: attach: one_jit_test-2: info function ^jit_function + + gdb/testsuite/ChangeLog: + 2016-03-31 Pedro Alves + + PR gdb/19858 + * gdb.base/jit-main.c: Include unistd.h. + (ATTACH): Define to 0 if not already defined. + (wait_for_gdb, mypid): New globals. + (WAIT_FOR_GDB): New macro. + (MAIN): Set an alarm. Store the process's pid. Wait for GDB at + some breakpoint locations. + * gdb.base/jit.exp (clean_reattach, continue_to_test_location): + New procedures. + (one_jit_test): Add REATTACH parameter, and handle it. Use + continue_to_test_location. + (top level): Test attach, and adjusts calls to one_jit_test. + +### a/gdb/testsuite/ChangeLog +### b/gdb/testsuite/ChangeLog +## -1,6 +1,21 @@ + 2016-03-31 Pedro Alves + + PR gdb/19858 ++ * gdb.base/jit-main.c: Include unistd.h. ++ (ATTACH): Define to 0 if not already defined. ++ (wait_for_gdb, mypid): New globals. ++ (WAIT_FOR_GDB): New macro. ++ (MAIN): Set an alarm. Store the process's pid. Wait for GDB at ++ some breakpoint locations. ++ * gdb.base/jit.exp (clean_reattach, continue_to_test_location): ++ New procedures. ++ (one_jit_test): Add REATTACH parameter, and handle it. Use ++ continue_to_test_location. ++ (top level): Test attach, and adjusts calls to one_jit_test. ++ ++2016-03-31 Pedro Alves ++ ++ PR gdb/19858 + * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add + BINSUFFIX parameter, and handle it. + (top level): Adjust calls compile_jit_test. +--- a/gdb/testsuite/gdb.base/jit-main.c ++++ b/gdb/testsuite/gdb.base/jit-main.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + /* ElfW is coming from linux. On other platforms it does not exist. + Let us define it here. */ +@@ -116,10 +117,22 @@ update_locations (const void *const addr, int idx) + } + } + ++/* Defined by the .exp file if testing attach. */ ++#ifndef ATTACH ++#define ATTACH 0 ++#endif ++ + #ifndef MAIN + #define MAIN main + #endif + ++/* Used to spin waiting for GDB. */ ++volatile int wait_for_gdb = ATTACH; ++#define WAIT_FOR_GDB while (wait_for_gdb) ++ ++/* The current process's PID. GDB retrieves this. */ ++int mypid; ++ + int + MAIN (int argc, char *argv[]) + { +@@ -127,6 +140,10 @@ MAIN (int argc, char *argv[]) + const char *libname = NULL; + int count = 0; + ++ alarm (300); ++ ++ mypid = getpid (); ++ + count = count; /* gdb break here 0 */ + + if (argc < 2) +@@ -190,7 +207,7 @@ MAIN (int argc, char *argv[]) + __jit_debug_register_code (); + } + +- i = 0; /* gdb break here 1 */ ++ WAIT_FOR_GDB; i = 0; /* gdb break here 1 */ + + /* Now unregister them all in reverse order. */ + while (__jit_debug_descriptor.relevant_entry != NULL) +@@ -215,5 +232,5 @@ MAIN (int argc, char *argv[]) + free (entry); + } + } +- return 0; /* gdb break here 2 */ ++ WAIT_FOR_GDB; return 0; /* gdb break here 2 */ + } +--- a/gdb/testsuite/gdb.base/jit.exp ++++ b/gdb/testsuite/gdb.base/jit.exp +@@ -66,7 +66,49 @@ proc compile_jit_test {testname binsuffix options} { + return 0 + } + +-proc one_jit_test {count match_str} { ++# Detach, restart GDB, and re-attach to the program. ++ ++proc clean_reattach {} { ++ global decimal gdb_prompt srcfile testfile ++ ++ # Get PID of test program. ++ set testpid -1 ++ set test "get inferior process ID" ++ gdb_test_multiple "p mypid" $test { ++ -re ".* = ($decimal).*$gdb_prompt $" { ++ set testpid $expect_out(1,string) ++ pass $test ++ } ++ } ++ ++ gdb_test_no_output "set var wait_for_gdb = 1" ++ gdb_test "detach" "Detaching from .*" ++ ++ clean_restart $testfile ++ ++ set test "attach" ++ gdb_test_multiple "attach $testpid" "$test" { ++ -re "Attaching to program.*.*main.*at .*$srcfile:.*$gdb_prompt $" { ++ pass "$test" ++ } ++ } ++ ++ gdb_test_no_output "set var wait_for_gdb = 0" ++} ++ ++# Continue to LOCATION in the program. If REATTACH, detach and ++# re-attach to the program from scratch. ++proc continue_to_test_location {location reattach} { ++ gdb_breakpoint [gdb_get_line_number $location] ++ gdb_continue_to_breakpoint $location ++ if {$reattach} { ++ with_test_prefix "$location" { ++ clean_reattach ++ } ++ } ++} ++ ++proc one_jit_test {count match_str reattach} { + with_test_prefix "one_jit_test-$count" { + global verbose testfile solib_binfile_target solib_binfile_test_msg + +@@ -91,8 +133,7 @@ proc one_jit_test {count match_str} { + gdb_test_no_output "set var libname = \"$solib_binfile_target\"" "set var libname = \"$solib_binfile_test_msg\"" + gdb_test_no_output "set var count = $count" + +- gdb_breakpoint [gdb_get_line_number "break here 1"] +- gdb_continue_to_breakpoint "break here 1" ++ continue_to_test_location "break here 1" $reattach + + gdb_test "info function ^jit_function" "$match_str" + +@@ -102,8 +143,8 @@ proc one_jit_test {count match_str} { + gdb_test "maintenance info break" + } + +- gdb_breakpoint [gdb_get_line_number "break here 2"] +- gdb_continue_to_breakpoint "break here 2" ++ continue_to_test_location "break here 2" $reattach ++ + # All jit librares must have been unregistered + gdb_test "info function jit_function" \ + "All functions matching regular expression \"jit_function\":" +@@ -113,8 +154,22 @@ proc one_jit_test {count match_str} { + if {[compile_jit_test jit.exp "" {}] < 0} { + return + } +-one_jit_test 1 "${hex} jit_function_0000" +-one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" ++one_jit_test 1 "${hex} jit_function_0000" 0 ++one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" 0 ++ ++# Test attaching to an inferior with some JIT libraries already ++# registered. We reuse the normal test, and detach/reattach at ++# specific interesting points. ++if {[can_spawn_for_attach]} { ++ if {[compile_jit_test "jit.exp attach tests" \ ++ "-attach" {additional_flags=-DATTACH=1}] < 0} { ++ return ++ } ++ ++ with_test_prefix attach { ++ one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" 1 ++ } ++} + + with_test_prefix PIE { + if {[compile_jit_test "jit.exp PIE tests" \ +@@ -122,5 +177,5 @@ with_test_prefix PIE { + return + } + +- one_jit_test 1 "${hex} jit_function_0000" ++ one_jit_test 1 "${hex} jit_function_0000" 0 + } diff --git a/SOURCES/gdb-vla-intel-04of23-fix.patch b/SOURCES/gdb-vla-intel-04of23-fix.patch index ad239b5..3b8d77a 100644 --- a/SOURCES/gdb-vla-intel-04of23-fix.patch +++ b/SOURCES/gdb-vla-intel-04of23-fix.patch @@ -1,38 +1,38 @@ Re: [PATCH 04/23] vla: make dynamic fortran arrays functional. https://sourceware.org/ml/gdb-patches/2014-06/msg00570.html -Index: gdb-7.7.90.20140627/gdb/valarith.c +Index: gdb-7.10.50.20151027/gdb/valarith.c =================================================================== ---- gdb-7.7.90.20140627.orig/gdb/valarith.c 2014-07-07 20:44:03.136394525 +0200 -+++ gdb-7.7.90.20140627/gdb/valarith.c 2014-07-07 20:45:41.588536459 +0200 -@@ -195,10 +195,17 @@ value_subscripted_rvalue (struct value * +--- gdb-7.10.50.20151027.orig/gdb/valarith.c 2015-11-03 20:41:48.543504999 +0100 ++++ gdb-7.10.50.20151027/gdb/valarith.c 2015-11-03 20:46:36.995238888 +0100 +@@ -193,10 +193,17 @@ 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); + unsigned int elt_size = type_length_units (elt_type); - unsigned int elt_offs = longest_to_int (index - lowerbound); + unsigned int elt_offs; LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)); struct value *v; + if (TYPE_NOT_ASSOCIATED (array_type)) -+ error (_("no such vector element because not associated")); ++ error (_("no such vector element (vector not associated)")); + if (TYPE_NOT_ALLOCATED (array_type)) -+ error (_("no such vector element because not allocated")); ++ error (_("no such vector element (vector not allocated)")); + + elt_offs = longest_to_int (index - lowerbound); + if (elt_stride > 0) elt_offs *= elt_stride; else if (elt_stride < 0) -@@ -212,14 +219,7 @@ value_subscripted_rvalue (struct value * +@@ -210,14 +217,7 @@ value_subscripted_rvalue (struct value * if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) - && elt_offs >= TYPE_LENGTH (array_type))) + && elt_offs >= type_length_units (array_type))) - { -- if (TYPE_NOT_ASSOCIATED (array_type)) -- error (_("no such vector element because not associated")); -- else if (TYPE_NOT_ALLOCATED (array_type)) -- error (_("no such vector element because not allocated")); +- if (type_not_associated (array_type)) +- error (_("no such vector element (vector not associated)")); +- else if (type_not_allocated (array_type)) +- error (_("no such vector element (vector not allocated)")); - else - error (_("no such vector element")); - } diff --git a/SOURCES/gdb-vla-intel-stringbt-fix.patch b/SOURCES/gdb-vla-intel-stringbt-fix.patch index 56ceff2..f6197f2 100644 --- a/SOURCES/gdb-vla-intel-stringbt-fix.patch +++ b/SOURCES/gdb-vla-intel-stringbt-fix.patch @@ -165,17 +165,3 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/dynamic-other-frame.f90 + end interface + call foo ('hello') +end -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:04.167533854 +0200 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-31 16:14:31.073718201 +0200 -@@ -33,9 +33,6 @@ gdb_continue_to_breakpoint "var_char-all - gdb_test "print var_char" \ - " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \ - "print var_char after allocated first time" --gdb_test "print *var_char" \ -- " = '\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000'" \ -- "print *var_char after allocated first time" - gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \ - "whatis var_char first time" - gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \ diff --git a/SOURCES/gdb-vla-intel.patch b/SOURCES/gdb-vla-intel.patch index 85c0364..edf6b23 100644 --- a/SOURCES/gdb-vla-intel.patch +++ b/SOURCES/gdb-vla-intel.patch @@ -6,11 +6,11 @@ GIT snapshot: commit 511bff520372ffc10fa2ff569c176bdf1e6e475d -Index: gdb-7.9.50.20150520/gdb/c-valprint.c +Index: gdb-7.10.50.20160106/gdb/c-valprint.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/c-valprint.c 2015-05-29 08:27:02.657717326 +0200 -+++ gdb-7.9.50.20150520/gdb/c-valprint.c 2015-05-29 08:27:06.253740209 +0200 -@@ -537,7 +537,16 @@ c_value_print (struct value *val, struct +--- gdb-7.10.50.20160106.orig/gdb/c-valprint.c 2016-01-08 19:15:35.065582359 +0100 ++++ gdb-7.10.50.20160106/gdb/c-valprint.c 2016-01-08 19:15:44.974637630 +0100 +@@ -642,7 +642,16 @@ { /* normal case */ fprintf_filtered (stream, "("); @@ -28,11 +28,11 @@ Index: gdb-7.9.50.20150520/gdb/c-valprint.c fprintf_filtered (stream, ") "); } } -Index: gdb-7.9.50.20150520/gdb/dwarf2loc.h +Index: gdb-7.10.50.20160106/gdb/dwarf2loc.h =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/dwarf2loc.h 2015-05-29 08:27:02.658717333 +0200 -+++ gdb-7.9.50.20150520/gdb/dwarf2loc.h 2015-05-29 08:27:06.253740209 +0200 -@@ -131,6 +131,11 @@ int dwarf2_evaluate_property (const stru +--- gdb-7.10.50.20160106.orig/gdb/dwarf2loc.h 2016-01-08 19:15:35.066582365 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2loc.h 2016-01-08 19:15:44.974637630 +0100 +@@ -138,6 +138,11 @@ struct property_addr_info *addr_stack, CORE_ADDR *value); @@ -44,24 +44,31 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2loc.h /* A helper for the compiler interface that compiles a single dynamic property to C code. -Index: gdb-7.9.50.20150520/gdb/dwarf2read.c +Index: gdb-7.10.50.20160106/gdb/dwarf2read.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/dwarf2read.c 2015-05-29 08:27:02.676717447 +0200 -+++ gdb-7.9.50.20150520/gdb/dwarf2read.c 2015-05-29 10:04:52.272600212 +0200 -@@ -1868,6 +1868,12 @@ static void process_cu_includes (void); - static void check_producer (struct dwarf2_cu *cu); +--- gdb-7.10.50.20160106.orig/gdb/dwarf2read.c 2016-01-08 19:15:35.078582432 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-08 19:15:44.980637663 +0100 +@@ -1745,7 +1745,9 @@ - static void free_line_header_voidp (void *arg); -+ -+static int -+attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, -+ struct dwarf2_cu *cu, struct dynamic_prop *prop, -+ const gdb_byte *additional_data, int additional_data_size); -+ - - /* Various complaints about symbol reading that don't abort the process. */ + static int attr_to_dynamic_prop (const struct attribute *attr, + struct die_info *die, struct dwarf2_cu *cu, +- struct dynamic_prop *prop); ++ struct dynamic_prop *prop, ++ const gdb_byte *additional_data, ++ int additional_data_size); + + /* memory allocation interface */ + +@@ -11420,7 +11422,7 @@ + { + newobj->static_link + = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); +- attr_to_dynamic_prop (attr, die, cu, newobj->static_link); ++ attr_to_dynamic_prop (attr, die, cu, newobj->static_link, NULL, 0); + } -@@ -14431,29 +14437,92 @@ read_tag_string_type (struct die_info *d + cu->list_in_scope = &local_symbols; +@@ -14471,29 +14473,92 @@ struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -161,7 +168,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -14776,13 +14845,15 @@ read_base_type (struct die_info *die, st +@@ -14816,13 +14881,15 @@ return set_die_type (die, type, cu); } @@ -178,8 +185,8 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack = &cu->objfile->objfile_obstack; -@@ -14795,8 +14866,25 @@ attr_to_dynamic_prop (const struct attri - baton = obstack_alloc (obstack, sizeof (*baton)); +@@ -14835,8 +14902,25 @@ + baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = NULL; baton->locexpr.per_cu = cu->per_cu; - baton->locexpr.size = DW_BLOCK (attr)->size; @@ -206,8 +213,8 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14832,8 +14920,28 @@ attr_to_dynamic_prop (const struct attri - baton = obstack_alloc (obstack, sizeof (*baton)); +@@ -14872,8 +14956,28 @@ + baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; - baton->locexpr.size = DW_BLOCK (target_attr)->size; @@ -237,7 +244,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14887,7 +14995,7 @@ read_subrange_type (struct die_info *die +@@ -14927,7 +15031,7 @@ struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -246,7 +253,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -14907,7 +15015,9 @@ read_subrange_type (struct die_info *die +@@ -14947,7 +15051,9 @@ low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -256,7 +263,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -14940,19 +15050,26 @@ read_subrange_type (struct die_info *die +@@ -14980,19 +15086,26 @@ break; } @@ -286,7 +293,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -15016,7 +15133,7 @@ read_subrange_type (struct die_info *die +@@ -15056,7 +15169,7 @@ && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -295,38 +302,26 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; -@@ -22128,9 +22245,37 @@ set_die_type (struct die_info *die, stru - && !HAVE_GNAT_AUX_INFO (type)) - INIT_GNAT_SPECIFIC (type); - -+ /* Read DW_AT_allocated and set in type. */ -+ attr = dwarf2_attr (die, DW_AT_allocated, cu); -+ if (attr_form_is_block (attr)) -+ { -+ struct dynamic_prop prop; -+ +@@ -22360,7 +22473,7 @@ + attr = dwarf2_attr (die, DW_AT_allocated, cu); + if (attr_form_is_block (attr)) + { +- if (attr_to_dynamic_prop (attr, die, cu, &prop)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) -+ { -+ TYPE_ALLOCATED_PROP (type) -+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop)); -+ *TYPE_ALLOCATED_PROP (type) = prop; -+ } -+ } -+ -+ /* Read DW_AT_associated and set in type. */ -+ attr = dwarf2_attr (die, DW_AT_associated, cu); -+ if (attr_form_is_block (attr)) -+ { -+ struct dynamic_prop prop; -+ + add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile); + } + else if (attr != NULL) +@@ -22375,7 +22488,7 @@ + attr = dwarf2_attr (die, DW_AT_associated, cu); + if (attr_form_is_block (attr)) + { +- if (attr_to_dynamic_prop (attr, die, cu, &prop)) + if (attr_to_dynamic_prop (attr, die, cu, &prop, NULL, 0)) -+ { -+ TYPE_ASSOCIATED_PROP (type) -+ = obstack_alloc (&objfile->objfile_obstack, sizeof (prop)); -+ *TYPE_ASSOCIATED_PROP (type) = prop; -+ } -+ } -+ + add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile); + } + else if (attr != NULL) +@@ -22388,7 +22501,7 @@ + /* 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)) @@ -334,22 +329,24 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile); if (dwarf2_per_objfile->die_type_hash == NULL) -Index: gdb-7.9.50.20150520/gdb/f-typeprint.c +Index: gdb-7.10.50.20160106/gdb/f-typeprint.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/f-typeprint.c 2015-05-29 08:27:02.678717460 +0200 -+++ gdb-7.9.50.20150520/gdb/f-typeprint.c 2015-05-29 08:27:06.261740260 +0200 -@@ -30,6 +30,7 @@ - #include "gdbcore.h" +--- gdb-7.10.50.20160106.orig/gdb/f-typeprint.c 2016-01-08 19:15:35.080582443 +0100 ++++ gdb-7.10.50.20160106/gdb/f-typeprint.c 2016-01-08 19:15:44.980637663 +0100 +@@ -31,6 +31,7 @@ #include "target.h" #include "f-lang.h" + #include "typeprint.h" +#include "valprint.h" #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; - +@@ -64,6 +65,17 @@ + { + val_print_not_allocated (stream); + return; ++ } ++ + if (TYPE_NOT_ASSOCIATED (type)) + { + val_print_not_associated (stream); @@ -359,73 +356,13 @@ Index: gdb-7.9.50.20150520/gdb/f-typeprint.c + { + val_print_not_allocated (stream); + return; -+ } -+ + } + f_type_print_base (type, stream, show, level); - code = TYPE_CODE (type); - if ((varstring != NULL && *varstring != '\0') -@@ -167,28 +179,36 @@ f_type_print_varspec_suffix (struct type - if (arrayprint_recurse_level == 1) - fprintf_filtered (stream, "("); - -- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY) -- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0, -- arrayprint_recurse_level); -- -- lower_bound = f77_get_lowerbound (type); -- if (lower_bound != 1) /* Not the default. */ -- fprintf_filtered (stream, "%d:", lower_bound); -- -- /* Make sure that, if we have an assumed size array, we -- print out a warning and print the upperbound as '*'. */ -- -- if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) -- fprintf_filtered (stream, "*"); -+ if (TYPE_NOT_ASSOCIATED (type)) -+ val_print_not_associated (stream); -+ else if (TYPE_NOT_ALLOCATED (type)) -+ val_print_not_allocated (stream); - else -- { -- upper_bound = f77_get_upperbound (type); -- fprintf_filtered (stream, "%d", upper_bound); -- } -- -- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) -- f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0, -- arrayprint_recurse_level); -+ { -+ -+ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY) -+ f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0, -+ arrayprint_recurse_level); -+ -+ lower_bound = f77_get_lowerbound (type); -+ if (lower_bound != 1) /* Not the default. */ -+ fprintf_filtered (stream, "%d:", lower_bound); -+ -+ /* Make sure that, if we have an assumed size array, we -+ print out a warning and print the upperbound as '*'. */ -+ -+ if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type)) -+ fprintf_filtered (stream, "*"); -+ else -+ { -+ upper_bound = f77_get_upperbound (type); -+ fprintf_filtered (stream, "%d", upper_bound); -+ } -+ -+ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY) -+ f_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0, -+ arrayprint_recurse_level); -+ } - if (arrayprint_recurse_level == 1) - fprintf_filtered (stream, ")"); - else -Index: gdb-7.9.50.20150520/gdb/f-valprint.c +Index: gdb-7.10.50.20160106/gdb/f-valprint.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/f-valprint.c 2015-05-29 08:26:49.567634019 +0200 -+++ gdb-7.9.50.20150520/gdb/f-valprint.c 2015-05-29 08:27:06.262740266 +0200 +--- gdb-7.10.50.20160106.orig/gdb/f-valprint.c 2016-01-08 19:15:35.081582448 +0100 ++++ gdb-7.10.50.20160106/gdb/f-valprint.c 2016-01-08 19:15:44.981637669 +0100 @@ -36,8 +36,6 @@ extern void _initialize_f_valprint (void); @@ -435,7 +372,7 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c static void f77_get_dynamic_length_of_aggregate (struct type *); int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; -@@ -45,15 +43,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM +@@ -45,15 +43,6 @@ /* 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. */ @@ -451,7 +388,7 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c int f77_get_lowerbound (struct type *type) { -@@ -111,47 +100,6 @@ f77_get_dynamic_length_of_aggregate (str +@@ -111,47 +100,6 @@ * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type))); } @@ -499,7 +436,7 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c /* Actual function which prints out F77 arrays, Valaddr == address in the superior. Address == the address in the inferior. */ -@@ -164,41 +112,62 @@ f77_print_array_1 (int nss, int ndimensi +@@ -164,41 +112,62 @@ const struct value_print_options *options, int *elts) { @@ -578,7 +515,7 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c fprintf_filtered (stream, "..."); } } -@@ -225,12 +194,6 @@ f77_print_array (struct type *type, cons +@@ -225,12 +194,6 @@ Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"), ndimensions, MAX_FORTRAN_DIMS); @@ -591,7 +528,7 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c f77_print_array_1 (1, ndimensions, type, valaddr, embedded_offset, address, stream, recurse, val, options, &elts); } -@@ -375,12 +338,15 @@ f_val_print (struct type *type, const gd +@@ -375,12 +338,15 @@ fprintf_filtered (stream, "( "); for (index = 0; index < TYPE_NFIELDS (type); index++) { @@ -612,11 +549,11 @@ Index: gdb-7.9.50.20150520/gdb/f-valprint.c if (index != TYPE_NFIELDS (type) - 1) fputs_filtered (", ", stream); } -Index: gdb-7.9.50.20150520/gdb/gdbtypes.c +Index: gdb-7.10.50.20160106/gdb/gdbtypes.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/gdbtypes.c 2015-05-29 08:27:02.683717492 +0200 -+++ gdb-7.9.50.20150520/gdb/gdbtypes.c 2015-05-29 10:54:36.236498749 +0200 -@@ -824,7 +824,8 @@ allocate_stub_method (struct type *type) +--- gdb-7.10.50.20160106.orig/gdb/gdbtypes.c 2016-01-08 19:15:35.083582459 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbtypes.c 2016-01-08 19:15:44.982637674 +0100 +@@ -836,7 +836,8 @@ struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, @@ -626,7 +563,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c { if (result_type == NULL) result_type = alloc_type_copy (index_type); -@@ -839,6 +840,7 @@ create_range_type (struct type *result_t +@@ -851,6 +852,7 @@ TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; @@ -634,7 +571,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -867,7 +869,7 @@ struct type * +@@ -879,7 +881,7 @@ create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -643,7 +580,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -875,7 +877,11 @@ create_static_range_type (struct type *r +@@ -887,7 +889,11 @@ high.kind = PROP_CONST; high.data.const_val = high_bound; @@ -656,20 +593,16 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c return result_type; } -@@ -1068,18 +1074,24 @@ create_array_type_with_stride (struct ty - - TYPE_CODE (result_type) = TYPE_CODE_ARRAY; - TYPE_TARGET_TYPE (result_type) = element_type; -- if (has_static_range (TYPE_RANGE_DATA (range_type))) -+ if (has_static_range (TYPE_RANGE_DATA (range_type)) -+ && dwarf2_address_data_valid (result_type)) +@@ -1084,16 +1090,21 @@ + && (!type_not_associated (result_type) + && !type_not_allocated (result_type))) { - LONGEST low_bound, high_bound; + LONGEST low_bound, high_bound, byte_stride; if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0) low_bound = high_bound = 0; - CHECK_TYPEDEF (element_type); + element_type = check_typedef (element_type); + + byte_stride = abs (TYPE_BYTE_STRIDE (range_type)); + @@ -683,7 +616,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1789,12 +1801,31 @@ stub_noname_complaint (void) +@@ -1804,12 +1815,31 @@ static int is_dynamic_type_internal (struct type *type, int top_level) { @@ -715,7 +648,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c /* 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; -@@ -1823,11 +1854,19 @@ is_dynamic_type_internal (struct type *t +@@ -1844,11 +1874,19 @@ { gdb_assert (TYPE_NFIELDS (type) == 1); @@ -738,7 +671,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c } case TYPE_CODE_STRUCT: -@@ -1840,6 +1879,18 @@ is_dynamic_type_internal (struct type *t +@@ -1861,6 +1899,18 @@ && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0)) return 1; } @@ -757,7 +690,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c break; } -@@ -1869,7 +1920,8 @@ resolve_dynamic_range (struct type *dyn_ +@@ -1890,7 +1940,8 @@ struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; const struct dwarf2_locexpr_baton *baton; @@ -767,12 +700,12 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE); -@@ -1901,12 +1953,19 @@ resolve_dynamic_range (struct type *dyn_ +@@ -1922,12 +1973,19 @@ high_bound.data.const_val = 0; } + prop = &TYPE_RANGE_DATA (dyn_range_type)->stride; -+ if (dwarf2_evaluate_property (prop, addr_stack, &value)) ++ if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value)) + { + stride.kind = PROP_CONST; + stride.data.const_val = value; @@ -790,137 +723,43 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.c TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; return static_range_type; } -@@ -1923,23 +1982,47 @@ resolve_dynamic_array (struct type *type - struct type *elt_type; - struct type *range_type; +@@ -1946,7 +2004,8 @@ struct type *ary_dim; -+ struct dynamic_prop *prop; -+ struct type *copy = copy_type (type); + struct dynamic_prop *prop; - gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY); + gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY + || 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, addr_stack); + type = copy_type (type); + +@@ -1971,13 +2030,18 @@ -+ prop = TYPE_ALLOCATED_PROP (type); -+ if (dwarf2_evaluate_property (prop, addr_stack, &value)) -+ { -+ TYPE_ALLOCATED_PROP (copy)->kind = PROP_CONST; -+ TYPE_ALLOCATED_PROP (copy)->data.const_val = value; -+ } -+ -+ prop = TYPE_ASSOCIATED_PROP (type); -+ if (dwarf2_evaluate_property (prop, addr_stack, &value)) -+ { -+ 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), addr_stack); + 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_stack); ++ || TYPE_CODE (ary_dim) == TYPE_CODE_STRING)) + elt_type = resolve_dynamic_array (ary_dim, addr_stack); else elt_type = TYPE_TARGET_TYPE (type); -- return create_array_type_with_stride (copy_type (type), -- elt_type, range_type, -- TYPE_FIELD_BITSIZE (type, 0)); +- return create_array_type_with_stride (type, elt_type, range_type, +- TYPE_FIELD_BITSIZE (type, 0)); + if (TYPE_CODE (type) == TYPE_CODE_STRING + && TYPE_FIELD_BITSIZE (type, 0) == 0) -+ return create_string_type (copy, -+ elt_type, -+ range_type); ++ return create_string_type (type, elt_type, range_type); + else -+ return create_array_type_with_stride (copy, -+ elt_type, -+ range_type, TYPE_FIELD_BITSIZE (type, 0)); ++ return create_array_type_with_stride (type, elt_type, range_type, ++ TYPE_FIELD_BITSIZE (type, 0)); } /* Resolve dynamic bounds of members of the union TYPE to static -@@ -4453,6 +4536,20 @@ copy_type_recursive (struct objfile *obj - TYPE_DYN_PROP_LIST (type)); - - -+ /* Copy allocated information. */ -+ if (TYPE_ALLOCATED_PROP (type) != NULL) -+ { -+ TYPE_ALLOCATED_PROP (new_type) = xmalloc (sizeof (struct dynamic_prop)); -+ *TYPE_ALLOCATED_PROP (new_type) = *TYPE_ALLOCATED_PROP (type); -+ } -+ -+ /* Copy associated information. */ -+ if (TYPE_ASSOCIATED_PROP (type) != NULL) -+ { -+ TYPE_ASSOCIATED_PROP (new_type) = xmalloc (sizeof (struct dynamic_prop)); -+ *TYPE_ASSOCIATED_PROP (new_type) = *TYPE_ASSOCIATED_PROP (type); -+ } -+ - /* Copy pointers to other types. */ - if (TYPE_TARGET_TYPE (type)) - TYPE_TARGET_TYPE (new_type) = -@@ -4494,6 +4591,35 @@ copy_type_recursive (struct objfile *obj - gdb_assert_not_reached ("bad type_specific_kind"); - } - -+ if (TYPE_ALLOCATED_PROP (type)) -+ { -+ TYPE_ALLOCATED_PROP (new_type) -+ = OBSTACK_ZALLOC (&TYPE_OWNER (type).objfile->objfile_obstack, -+ struct dynamic_prop); -+ memcpy (TYPE_ALLOCATED_PROP (new_type), TYPE_ALLOCATED_PROP (type), -+ sizeof (struct dynamic_prop)); -+ } -+ -+ if (TYPE_ASSOCIATED_PROP (type)) -+ { -+ TYPE_ASSOCIATED_PROP (new_type) -+ = OBSTACK_ZALLOC (&TYPE_OWNER (type).objfile->objfile_obstack, -+ struct dynamic_prop); -+ memcpy (TYPE_ASSOCIATED_PROP (new_type), TYPE_ASSOCIATED_PROP (type), -+ sizeof (struct dynamic_prop)); -+ } -+ -+ if (TYPE_NFIELDS (type)) -+ { -+ int nfields = TYPE_NFIELDS (type); -+ -+ TYPE_FIELDS (new_type) -+ = OBSTACK_CALLOC (&TYPE_OWNER (type).objfile->objfile_obstack, -+ nfields, struct field); -+ memcpy (TYPE_FIELDS (new_type), TYPE_FIELDS (type), -+ nfields * sizeof (struct field)); -+ } -+ - return new_type; - } - -@@ -4519,6 +4645,14 @@ copy_type (const struct type *type) - TYPE_DYN_PROP_LIST (new_type) - = copy_dynamic_prop_list (&TYPE_OBJFILE (type) -> objfile_obstack, - TYPE_DYN_PROP_LIST (type)); -+ if (TYPE_ALLOCATED_PROP (type) != NULL) -+ TYPE_ALLOCATED_PROP (new_type) = obstack_copy -+ (&TYPE_OBJFILE (type)->objfile_obstack, TYPE_ALLOCATED_PROP (type), -+ sizeof (*TYPE_ALLOCATED_PROP (type))); -+ if (TYPE_ASSOCIATED_PROP (type) != NULL) -+ TYPE_ASSOCIATED_PROP (new_type) = obstack_copy -+ (&TYPE_OBJFILE (type)->objfile_obstack, TYPE_ASSOCIATED_PROP (type), -+ sizeof (*TYPE_ASSOCIATED_PROP (type))); - - return new_type; - } -Index: gdb-7.9.50.20150520/gdb/gdbtypes.h +Index: gdb-7.10.50.20160106/gdb/gdbtypes.h =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-29 08:27:02.685717504 +0200 -+++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-29 08:46:08.862924052 +0200 -@@ -569,6 +569,10 @@ struct range_bounds +--- gdb-7.10.50.20160106.orig/gdb/gdbtypes.h 2016-01-08 19:15:35.085582471 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbtypes.h 2016-01-08 19:15:44.983637680 +0100 +@@ -577,6 +577,10 @@ struct dynamic_prop high; @@ -931,7 +770,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -741,6 +745,18 @@ struct main_type +@@ -749,6 +753,18 @@ /* * Contains all dynamic type properties. */ struct dynamic_prop_list *dyn_prop_list; @@ -950,7 +789,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h }; /* * A ``struct type'' describes a particular instance of a type, with -@@ -1255,6 +1271,15 @@ extern void allocate_gnat_aux_type (stru +@@ -1255,6 +1271,15 @@ TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -966,13 +805,10 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1265,6 +1290,20 @@ extern void allocate_gnat_aux_type (stru - TYPE_DATA_LOCATION (thistype)->data.const_val +@@ -1266,6 +1291,18 @@ #define TYPE_DATA_LOCATION_KIND(thistype) \ TYPE_DATA_LOCATION (thistype)->kind -+#define TYPE_ALLOCATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->allocated -+#define TYPE_ASSOCIATED_PROP(thistype) TYPE_MAIN_TYPE(thistype)->associated -+ + +/* Allocated status of type object. If set to non-zero it means the object + is allocated. A zero value means it is not allocated. */ +#define TYPE_NOT_ALLOCATED(t) (TYPE_ALLOCATED_PROP (t) \ @@ -984,10 +820,11 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h +#define TYPE_NOT_ASSOCIATED(t) (TYPE_ASSOCIATED_PROP (t) \ + && TYPE_ASSOCIATED_PROP (t)->kind == PROP_CONST \ + && !TYPE_ASSOCIATED_PROP (t)->data.const_val) - - /* Attribute accessors for dynamic properties. */ - #define TYPE_DYN_PROP_LIST(thistype) \ -@@ -1283,6 +1322,9 @@ extern void allocate_gnat_aux_type (stru ++ + /* Property accessors for the type allocated/associated. */ + #define TYPE_ALLOCATED_PROP(thistype) \ + get_dyn_prop (DYN_PROP_ALLOCATED, thistype) +@@ -1289,6 +1326,9 @@ TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -997,7 +834,7 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1764,6 +1806,7 @@ extern struct type *create_array_type_wi +@@ -1775,6 +1815,7 @@ extern struct type *create_range_type (struct type *, struct type *, const struct dynamic_prop *, @@ -1005,223 +842,10 @@ Index: gdb-7.9.50.20150520/gdb/gdbtypes.h const struct dynamic_prop *); extern struct type *create_array_type (struct type *, struct type *, -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp 2015-05-29 08:27:06.266740292 +0200 -@@ -0,0 +1,65 @@ -+# Copyright 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 "vla.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# Check the association status of various types of VLA's -+# and pointer to VLA's. -+gdb_breakpoint [gdb_get_line_number "vla1-allocated"] -+gdb_continue_to_breakpoint "vla1-allocated" -+gdb_test "print l" " = \\.TRUE\\." \ -+ "print vla1 allocation status (allocated)" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "print l" " = \\.TRUE\\." \ -+ "print vla2 allocation status (allocated)" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-associated"] -+gdb_continue_to_breakpoint "pvla-associated" -+gdb_test "print l" " = \\.TRUE\\." \ -+ "print pvla associated status (associated)" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"] -+gdb_continue_to_breakpoint "pvla-re-associated" -+gdb_test "print l" " = \\.TRUE\\." \ -+ "print pvla associated status (re-associated)" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"] -+gdb_continue_to_breakpoint "pvla-deassociated" -+gdb_test "print l" " = \\.FALSE\\." \ -+ "print pvla allocation status (deassociated)" -+ -+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"] -+gdb_continue_to_breakpoint "vla1-deallocated" -+gdb_test "print l" " = \\.FALSE\\." \ -+ "print vla1 allocation status (deallocated)" -+gdb_test "print vla1" " = " \ -+ "print deallocated vla1" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-deallocated"] -+gdb_continue_to_breakpoint "vla2-deallocated" -+gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated" -+gdb_test "print vla2" " = " "print deallocated vla2" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.exp 2015-05-29 08:27:06.266740292 +0200 -@@ -0,0 +1,82 @@ -+# Copyright 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 ".f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+# check that all fortran standard datatypes will be -+# handled correctly when using as VLA's -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+gdb_breakpoint [gdb_get_line_number "vlas-allocated"] -+gdb_continue_to_breakpoint "vlas-allocated" -+gdb_test "next" " = allocated\\\(realvla\\\)" \ -+ "next to allocation status of intvla" -+gdb_test "print l" " = \\.TRUE\\." "intvla allocated" -+gdb_test "next" " = allocated\\\(complexvla\\\)" \ -+ "next to allocation status of realvla" -+gdb_test "print l" " = \\.TRUE\\." "realvla allocated" -+gdb_test "next" " = allocated\\\(logicalvla\\\)" \ -+ "next to allocation status of complexvla" -+gdb_test "print l" " = \\.TRUE\\." "complexvla allocated" -+gdb_test "next" " = allocated\\\(charactervla\\\)" \ -+ "next to allocation status of logicalvla" -+gdb_test "print l" " = \\.TRUE\\." "logicalvla allocated" -+gdb_test "next" "intvla\\\(:,:,:\\\) = 1" \ -+ "next to allocation status of charactervla" -+gdb_test "print l" " = \\.TRUE\\." "charactervla allocated" -+ -+gdb_breakpoint [gdb_get_line_number "vlas-initialized"] -+gdb_continue_to_breakpoint "vlas-initialized" -+gdb_test "ptype intvla" "type = integer\\\(kind=4\\\) \\\(11,22,33\\\)" \ -+ "ptype intvla" -+gdb_test "ptype realvla" "type = real\\\(kind=4\\\) \\\(11,22,33\\\)" \ -+ "ptype realvla" -+gdb_test "ptype complexvla" "type = complex\\\(kind=4\\\) \\\(11,22,33\\\)" \ -+ "ptype complexvla" -+gdb_test "ptype logicalvla" "type = logical\\\(kind=4\\\) \\\(11,22,33\\\)" \ -+ "ptype logicalvla" -+gdb_test "ptype charactervla" "type = character\\\*1 \\\(11,22,33\\\)" \ -+ "ptype charactervla" -+ -+gdb_test "print intvla(5,5,5)" " = 1" "print intvla(5,5,5) (1st)" -+gdb_test "print realvla(5,5,5)" " = 3.14\\d+" \ -+ "print realvla(5,5,5) (1st)" -+gdb_test "print complexvla(5,5,5)" " = \\\(2,-3\\\)" \ -+ "print complexvla(5,5,5) (1st)" -+gdb_test "print logicalvla(5,5,5)" " = \\.TRUE\\." \ -+ "print logicalvla(5,5,5) (1st)" -+gdb_test "print charactervla(5,5,5)" " = 'K'" \ -+ "print charactervla(5,5,5) (1st)" -+ -+gdb_breakpoint [gdb_get_line_number "vlas-modified"] -+gdb_continue_to_breakpoint "vlas-modified" -+gdb_test "print intvla(5,5,5)" " = 42" "print intvla(5,5,5) (2nd)" -+gdb_test "print realvla(5,5,5)" " = 4.13\\d+" \ -+ "print realvla(5,5,5) (2nd)" -+gdb_test "print complexvla(5,5,5)" " = \\\(-3,2\\\)" \ -+ "print complexvla(5,5,5) (2nd)" -+gdb_test "print logicalvla(5,5,5)" " = \\.FALSE\\." \ -+ "print logicalvla(5,5,5) (2nd)" -+gdb_test "print charactervla(5,5,5)" " = 'X'" \ -+ "print charactervla(5,5,5) (2nd)" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.f90 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-datatypes.f90 2015-05-29 08:27:06.266740292 +0200 -@@ -0,0 +1,51 @@ -+! Copyright 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 2 of the License, or -+! (at your option) any later version. -+! -+! This program is distributed in the hope that it will be useful, -+! but WITHOUT ANY WARRANTY; without even the implied warranty of -+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+! GNU General Public License for more details. -+! -+! You should have received a copy of the GNU General Public License -+! along with this program; if not, write to the Free Software -+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+program vla_primitives -+ integer, allocatable :: intvla(:, :, :) -+ real, allocatable :: realvla(:, :, :) -+ complex, allocatable :: complexvla(:, :, :) -+ logical, allocatable :: logicalvla(:, :, :) -+ character, allocatable :: charactervla(:, :, :) -+ logical :: l -+ -+ allocate (intvla (11,22,33)) -+ allocate (realvla (11,22,33)) -+ allocate (complexvla (11,22,33)) -+ allocate (logicalvla (11,22,33)) -+ allocate (charactervla (11,22,33)) -+ -+ l = allocated(intvla) ! vlas-allocated -+ l = allocated(realvla) -+ l = allocated(complexvla) -+ l = allocated(logicalvla) -+ l = allocated(charactervla) -+ -+ intvla(:,:,:) = 1 -+ realvla(:,:,:) = 3.14 -+ complexvla(:,:,:) = cmplx(2.0,-3.0) -+ logicalvla(:,:,:) = .TRUE. -+ charactervla(:,:,:) = char(75) -+ -+ intvla(5,5,5) = 42 ! vlas-initialized -+ realvla(5,5,5) = 4.13 -+ complexvla(5,5,5) = cmplx(-3.0,2.0) -+ logicalvla(5,5,5) = .FALSE. -+ charactervla(5,5,5) = 'X' -+ -+ ! dummy statement for bp -+ l = .FALSE. ! vlas-modified -+end program vla_primitives -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.exp 2015-05-29 08:27:06.266740292 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp 2016-01-08 19:15:44.983637680 +0100 @@ -0,0 +1,61 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1284,10 +908,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.exp + "print vla3 (after func2)" +gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \ + "ptype vla3 (after func2)" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.f90 +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.f90 2015-05-29 08:27:06.267740298 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90 2016-01-08 19:15:44.983637680 +0100 @@ -0,0 +1,71 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1360,11 +984,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-func.f90 + + ret = .TRUE. ! func2-returned +end program vla_func -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp 2015-05-29 08:27:06.267740298 +0200 -@@ -0,0 +1,62 @@ ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp 2016-01-08 19:15:44.984637686 +0100 +@@ -0,0 +1,44 @@ +# Copyright 2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -1380,7 +1004,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + -+standard_testfile "vla.f90" ++standard_testfile ".f90" + +if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ + {debug f90 quiet}] } { @@ -1392,138 +1016,63 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-history.exp + continue +} + -+# Set some breakpoints and print complete vla. -+gdb_breakpoint [gdb_get_line_number "vla1-init"] -+gdb_continue_to_breakpoint "vla1-init" -+gdb_test "print vla1" " = " "print non-allocated vla1" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "print vla1" " = \\( *\\( *\\( *0, *0, *0,\[()0, .\]*\\)" \ -+ "print vla1 allocated" -+gdb_test "print vla2" " = \\( *\\( *\\( *0, *0, *0,\[()0, .\]*\\)" \ -+ "print vla2 allocated" -+ -+gdb_breakpoint [gdb_get_line_number "vla1-filled"] -+gdb_continue_to_breakpoint "vla1-filled" -+gdb_test "print vla1" \ -+ " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" \ -+ "print vla1 filled" -+ -+# Try to access history values for full vla prints. -+gdb_test "print \$1" " = " "print \$1" -+gdb_test "print \$2" " = \\( *\\( *\\( *0, *0, *0,\[()0, .\]*\\)" \ -+ "print \$2" -+gdb_test "print \$3" " = \\( *\\( *\\( *0, *0, *0,\[()0, .\]*\\)" \ -+ "print \$3" -+gdb_test "print \$4" \ -+ " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" "print \$4" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-filled"] -+gdb_continue_to_breakpoint "vla2-filled" -+gdb_test "print vla2(1,43,20)" " = 1311" "print vla2(1,43,20)" -+gdb_test "print vla1(1,3,8)" " = 1001" "print vla2(1,3,8)" -+ -+# Try to access history values for vla values. -+gdb_test "print \$9" " = 1311" "print \$9" -+gdb_test "print \$10" " = 1001" "print \$10" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp ++gdb_breakpoint [gdb_get_line_number "re-reverse-elements"] ++gdb_continue_to_breakpoint "re-reverse-elements" ++gdb_test "print pvla" " = \\\(1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\\)" \ ++ "print re-reverse-elements" ++gdb_test "print pvla(1)" " = 1" "print first re-reverse-element" ++gdb_test "print pvla(10)" " = 10" "print last re-reverse-element" ++ ++gdb_breakpoint [gdb_get_line_number "odd-elements"] ++gdb_continue_to_breakpoint "odd-elements" ++gdb_test "print pvla" " = \\\(1, 3, 5, 7, 9\\\)" "print odd-elements" ++gdb_test "print pvla(1)" " = 1" "print first odd-element" ++gdb_test "print pvla(5)" " = 9" "print last odd-element" ++ ++gdb_breakpoint [gdb_get_line_number "single-element"] ++gdb_continue_to_breakpoint "single-element" ++gdb_test "print pvla" " = \\\(5\\\)" "print single-element" ++gdb_test "print pvla(1)" " = 5" "print one single-element" +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype-sub.exp 2015-05-29 08:27:06.267740298 +0200 -@@ -0,0 +1,87 @@ -+# Copyright 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 . ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90 2016-01-08 19:15:44.984637686 +0100 +@@ -0,0 +1,30 @@ ++! Copyright 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 2 of the License, or ++! (at your option) any later version. ++! ++! This program is distributed in the hope that it will be useful, ++! but WITHOUT ANY WARRANTY; without even the implied warranty of ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++! GNU General Public License for more details. ++! ++! You should have received a copy of the GNU General Public License ++! along with this program; if not, write to the Free Software ++! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + -+standard_testfile "vla-sub.f90" ++program vla_stride ++ integer, target, allocatable :: vla (:) ++ integer, pointer :: pvla (:) + -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} ++ allocate(vla(10)) ++ vla = (/ (I, I = 1,10) /) + -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} ++ pvla => vla(10:1:-1) ++ pvla => pvla(10:1:-1) ++ pvla => vla(1:10:2) ! re-reverse-elements ++ pvla => vla(5:4:-2) ! odd-elements + -+# Pass fixed array to function and handle them as vla in function. -+gdb_breakpoint [gdb_get_line_number "not-filled"] -+gdb_continue_to_breakpoint "not-filled (1st)" -+gdb_test "ptype array1" "type = integer\\\(kind=4\\\) \\\(42,42\\\)" \ -+ "ptype array1 (passed fixed)" -+gdb_test "ptype array2" "type = real\\\(kind=4\\\) \\\(42,42,42\\\)" \ -+ "ptype array2 (passed fixed)" -+gdb_test "ptype array1(40, 10)" "type = integer\\\(kind=4\\\)" \ -+ "ptype array1(40, 10) (passed fixed)" -+gdb_test "ptype array2(13, 11, 5)" "type = real\\\(kind=4\\\)" \ -+ "ptype array2(13, 11, 5) (passed fixed)" -+ -+# Pass sub arrays to function and handle them as vla in function. -+gdb_continue_to_breakpoint "not-filled (2nd)" -+gdb_test "ptype array1" "type = integer\\\(kind=4\\\) \\\(6,6\\\)" \ -+ "ptype array1 (passed sub-array)" -+gdb_test "ptype array2" "type = real\\\(kind=4\\\) \\\(6,6,6\\\)" \ -+ "ptype array2 (passed sub-array)" -+gdb_test "ptype array1(3, 3)" "type = integer\\\(kind=4\\\)" \ -+ "ptype array1(3, 3) (passed sub-array)" -+gdb_test "ptype array2(4, 4, 4)" "type = real\\\(kind=4\\\)" \ -+ "ptype array2(4, 4, 4) (passed sub-array)" -+ -+# Check ptype outside of bounds. This should not crash GDB. -+gdb_test "ptype array1(100, 100)" "no such vector element" \ -+ "ptype array1(100, 100) subarray do not crash (passed sub-array)" -+gdb_test "ptype array2(100, 100, 100)" "no such vector element" \ -+ "ptype array2(100, 100, 100) subarray do not crash (passed sub-array)" -+ -+# Pass vla to function. -+gdb_continue_to_breakpoint "not-filled (3rd)" -+gdb_test "ptype array1" "type = integer\\\(kind=4\\\) \\\(20,20\\\)" \ -+ "ptype array1 (passed vla)" -+gdb_test "ptype array2" "type = real\\\(kind=4\\\) \\\(10,10,10\\\)" \ -+ "ptype array2 (passed vla)" -+gdb_test "ptype array1(3, 3)" "type = integer\\\(kind=4\\\)" \ -+ "ptype array1(3, 3) (passed vla)" -+gdb_test "ptype array2(4, 4, 4)" "type = real\\\(kind=4\\\)" \ -+ "ptype array2(4, 4, 4) (passed vla)" -+ -+# Check ptype outside of bounds. This should not crash GDB. -+gdb_test "ptype array1(100, 100)" "no such vector element" \ -+ "ptype array1(100, 100) VLA do not crash (passed vla)" -+gdb_test "ptype array2(100, 100, 100)" "no such vector element" \ -+ "ptype array2(100, 100, 100) VLA do not crash (passed vla)" -+ -+# Pass fixed array to function and handle it as VLA of arbitrary length in -+# function. -+gdb_breakpoint [gdb_get_line_number "end-of-bar"] -+gdb_continue_to_breakpoint "end-of-bar" -+gdb_test "ptype array1" \ -+ "type = (PTR TO -> \\( )?integer(\\(kind=4\\)|\\*4) \\(\\*\\)\\)?" \ -+ "ptype array1 (arbitrary length)" -+gdb_test "ptype array2" \ -+ "type = (PTR TO -> \\( )?integer(\\(kind=4\\)|\\*4) \\(4:9,10:\\*\\)\\)?" \ -+ "ptype array2 (arbitrary length)" -+gdb_test "ptype array1(100)" "type = integer\\\(kind=4\\\)" \ -+ "ptype array1(100) (arbitrary length)" -+gdb_test "ptype array2(4,100)" "type = integer\\\(kind=4\\\)" \ -+ "ptype array2(4,100) (arbitrary length)" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype.exp ++ pvla => null() ! single-element ++end program vla_stride +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype.exp 2015-05-29 08:27:06.267740298 +0200 -@@ -0,0 +1,96 @@ ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.exp 2016-01-08 19:15:44.984637686 +0100 +@@ -0,0 +1,101 @@ +# Copyright 2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -1539,272 +1088,33 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-ptype.exp +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + -+standard_testfile "vla.f90" ++standard_testfile ".f90" + +if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ + {debug f90 quiet}] } { + return -1 +} + ++# check that all fortran standard datatypes will be ++# handled correctly when using as VLA's ++ +if ![runto MAIN__] then { + perror "couldn't run to breakpoint MAIN__" + continue +} + -+# Check the ptype of various VLA states and pointer to VLA's. -+gdb_breakpoint [gdb_get_line_number "vla1-init"] -+gdb_continue_to_breakpoint "vla1-init" -+gdb_test "ptype vla1" "type = " "ptype vla1 not initialized" -+gdb_test "ptype vla2" "type = " "ptype vla2 not initialized" -+gdb_test "ptype pvla" "type = " "ptype pvla not initialized" -+gdb_test "ptype vla1(3, 6, 9)" "no such vector element because not allocated" \ -+ "ptype vla1(3, 6, 9) not initialized" -+gdb_test "ptype vla2(5, 45, 20)" \ -+ "no such vector element because not allocated" \ -+ "ptype vla1(5, 45, 20) not initialized" -+ -+gdb_breakpoint [gdb_get_line_number "vla1-allocated"] -+gdb_continue_to_breakpoint "vla1-allocated" -+gdb_test "ptype vla1" "type = real\\\(kind=4\\\) \\\(10,10,10\\\)" \ -+ "ptype vla1 allocated" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "ptype vla2" "type = real\\\(kind=4\\\) \\\(7,42:50,13:35\\\)" \ -+ "ptype vla2 allocated" -+ -+gdb_breakpoint [gdb_get_line_number "vla1-filled"] -+gdb_continue_to_breakpoint "vla1-filled" -+gdb_test "ptype vla1" "type = real\\\(kind=4\\\) \\\(10,10,10\\\)" \ -+ "ptype vla1 filled" -+gdb_test "ptype vla1(3, 6, 9)" "type = real\\\(kind=4\\\)" \ -+ "ptype vla1(3, 6, 9)" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-filled"] -+gdb_continue_to_breakpoint "vla2-filled" -+gdb_test "ptype vla2" "type = real\\\(kind=4\\\) \\\(7,42:50,13:35\\\)" \ -+ "ptype vla2 filled" -+gdb_test "ptype vla2(5, 45, 20)" "type = real\\\(kind=4\\\)" \ -+ "ptype vla1(5, 45, 20) filled" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-associated"] -+gdb_continue_to_breakpoint "pvla-associated" -+gdb_test "ptype pvla" "type = real\\\(kind=4\\\) \\\(10,10,10\\\)" \ -+ "ptype pvla associated" -+gdb_test "ptype pvla(3, 6, 9)" "type = real\\\(kind=4\\\)" \ -+ "ptype pvla(3, 6, 9)" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"] -+gdb_continue_to_breakpoint "pvla-re-associated" -+gdb_test "ptype pvla" "type = real\\\(kind=4\\\) \\\(7,42:50,13:35\\\)" \ -+ "ptype pvla re-associated" -+gdb_test "ptype vla2(5, 45, 20)" "type = real\\\(kind=4\\\)" \ -+ "ptype vla1(5, 45, 20) re-associated" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"] -+gdb_continue_to_breakpoint "pvla-deassociated" -+gdb_test "ptype pvla" "type = " "ptype pvla deassociated" -+gdb_test "ptype pvla(5, 45, 20)" \ -+ "no such vector element because not associated" \ -+ "ptype pvla(5, 45, 20) not associated" -+ -+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"] -+gdb_continue_to_breakpoint "vla1-deallocated" -+gdb_test "ptype vla1" "type = " "ptype vla1 not allocated" -+gdb_test "ptype vla1(3, 6, 9)" "no such vector element because not allocated" \ -+ "ptype vla1(3, 6, 9) not allocated" -+ -+gdb_breakpoint [gdb_get_line_number "vla2-deallocated"] -+gdb_continue_to_breakpoint "vla2-deallocated" -+gdb_test "ptype vla2" "type = " "ptype vla2 not allocated" -+gdb_test "ptype vla2(5, 45, 20)" \ -+ "no such vector element because not allocated" \ -+ "ptype vla2(5, 45, 20) not allocated" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sizeof.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sizeof.exp 2015-05-29 08:27:06.267740298 +0200 -@@ -0,0 +1,46 @@ -+# Copyright 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 "vla.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# Try to access values in non allocated VLA -+gdb_breakpoint [gdb_get_line_number "vla1-init"] -+gdb_continue_to_breakpoint "vla1-init" -+gdb_test "print sizeof(vla1)" " = 0" "print sizeof non-allocated vla1" -+ -+# Try to access value in allocated VLA -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "print sizeof(vla1)" " = 4000" "print sizeof allocated vla1" -+ -+# Try to access values in undefined pointer to VLA (dangling) -+gdb_breakpoint [gdb_get_line_number "vla1-filled"] -+gdb_continue_to_breakpoint "vla1-filled" -+gdb_test "print sizeof(pvla)" " = 0" "print sizeof non-associated pvla" -+ -+# Try to access values in pointer to VLA and compare them -+gdb_breakpoint [gdb_get_line_number "pvla-associated"] -+gdb_continue_to_breakpoint "pvla-associated" -+gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.exp 2015-05-29 08:27:06.267740298 +0200 -@@ -0,0 +1,44 @@ -+# Copyright 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 ".f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+gdb_breakpoint [gdb_get_line_number "re-reverse-elements"] -+gdb_continue_to_breakpoint "re-reverse-elements" -+gdb_test "print pvla" " = \\\(1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\\)" \ -+ "print re-reverse-elements" -+gdb_test "print pvla(1)" " = 1" "print first re-reverse-element" -+gdb_test "print pvla(10)" " = 10" "print last re-reverse-element" -+ -+gdb_breakpoint [gdb_get_line_number "odd-elements"] -+gdb_continue_to_breakpoint "odd-elements" -+gdb_test "print pvla" " = \\\(1, 3, 5, 7, 9\\\)" "print odd-elements" -+gdb_test "print pvla(1)" " = 1" "print first odd-element" -+gdb_test "print pvla(5)" " = 9" "print last odd-element" -+ -+gdb_breakpoint [gdb_get_line_number "single-element"] -+gdb_continue_to_breakpoint "single-element" -+gdb_test "print pvla" " = \\\(5\\\)" "print single-element" -+gdb_test "print pvla(1)" " = 5" "print one single-element" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.f90 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-stride.f90 2015-05-29 08:27:06.268740305 +0200 -@@ -0,0 +1,30 @@ -+! Copyright 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 2 of the License, or -+! (at your option) any later version. -+! -+! This program is distributed in the hope that it will be useful, -+! but WITHOUT ANY WARRANTY; without even the implied warranty of -+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+! GNU General Public License for more details. -+! -+! You should have received a copy of the GNU General Public License -+! along with this program; if not, write to the Free Software -+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+program vla_stride -+ integer, target, allocatable :: vla (:) -+ integer, pointer :: pvla (:) -+ -+ allocate(vla(10)) -+ vla = (/ (I, I = 1,10) /) -+ -+ pvla => vla(10:1:-1) -+ pvla => pvla(10:1:-1) -+ pvla => vla(1:10:2) ! re-reverse-elements -+ pvla => vla(5:4:-2) ! odd-elements -+ -+ pvla => null() ! single-element -+end program vla_stride -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-05-29 08:27:06.268740305 +0200 -@@ -0,0 +1,104 @@ -+# Copyright 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 ".f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+# check that all fortran standard datatypes will be -+# handled correctly when using as VLA's -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"] -+gdb_continue_to_breakpoint "var_char-allocated-1" -+gdb_test "print var_char" \ -+ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \ -+ "print var_char after allocated first time" -+gdb_test "print *var_char" \ -+ " = '\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000'" \ -+ "print *var_char after allocated first time" -+gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \ -+ "whatis var_char first time" -+gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \ -+ "ptype var_char first time" -+gdb_test "next" "\\d+.*var_char = 'foo'.*" \ -+ "next to allocation status of var_char" -+gdb_test "print l" " = .TRUE." "print allocation status first time" ++gdb_breakpoint [gdb_get_line_number "var_char-allocated-1"] ++gdb_continue_to_breakpoint "var_char-allocated-1" ++gdb_test "print var_char" \ ++ " = \\(PTR TO -> \\( character\\*10 \\)\\) ${hex}" \ ++ "print var_char after allocated first time" ++gdb_test "whatis var_char" "type = PTR TO -> \\( character\\*10 \\)" \ ++ "whatis var_char first time" ++gdb_test "ptype var_char" "type = PTR TO -> \\( character\\*10 \\)" \ ++ "ptype var_char first time" ++gdb_test "next" "\\d+.*var_char = 'foo'.*" \ ++ "next to allocation status of var_char" ++gdb_test "print l" " = .TRUE." "print allocation status first time" + +gdb_breakpoint [gdb_get_line_number "var_char-filled-1"] +gdb_continue_to_breakpoint "var_char-filled-1" @@ -1864,10 +1174,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.exp + "whatis var_char_p after associated" +gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \ + "ptype var_char_p after associated" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.f90 +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.f90 2015-05-31 15:25:01.305615755 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.f90 2016-01-08 19:15:44.984637686 +0100 @@ -0,0 +1,40 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1909,734 +1219,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-strings.f90 + var_char_p => null() + l = associated(var_char_p) ! var_char_p-not-associated +end program vla_strings -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sub.f90 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-sub.f90 2015-05-29 08:27:06.268740305 +0200 -@@ -0,0 +1,82 @@ -+! Copyright 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 2 of the License, or -+! (at your option) any later version. -+! -+! This program is distributed in the hope that it will be useful, -+! but WITHOUT ANY WARRANTY; without even the implied warranty of -+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+! GNU General Public License for more details. -+! -+! You should have received a copy of the GNU General Public License -+! along with this program; if not, write to the Free Software -+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+! -+! Original file written by Jakub Jelinek and -+! Jan Kratochvil . -+! Modified for the GDB testcases by Keven Boell . -+ -+subroutine foo (array1, array2) -+ integer :: array1 (:, :) -+ real :: array2 (:, :, :) -+ -+ array1(:,:) = 5 ! not-filled -+ array1(1, 1) = 30 -+ -+ array2(:,:,:) = 6 ! array1-filled -+ array2(:,:,:) = 3 -+ array2(1,1,1) = 30 -+ array2(3,3,3) = 90 ! array2-almost-filled -+end subroutine -+ -+subroutine bar (array1, array2) -+ integer :: array1 (*) -+ integer :: array2 (4:9, 10:*) -+ -+ array1(5:10) = 1311 -+ array1(7) = 1 -+ array1(100) = 100 -+ array2(4,10) = array1(7) -+ array2(4,100) = array1(7) -+ return ! end-of-bar -+end subroutine -+ -+program vla_sub -+ interface -+ subroutine foo (array1, array2) -+ integer :: array1 (:, :) -+ real :: array2 (:, :, :) -+ end subroutine -+ end interface -+ interface -+ subroutine bar (array1, array2) -+ integer :: array1 (*) -+ integer :: array2 (4:9, 10:*) -+ end subroutine -+ end interface -+ -+ real, allocatable :: vla1 (:, :, :) -+ integer, allocatable :: vla2 (:, :) -+ -+ ! used for subroutine -+ integer :: sub_arr1(42, 42) -+ real :: sub_arr2(42, 42, 42) -+ integer :: sub_arr3(42) -+ -+ sub_arr1(:,:) = 1 ! vla2-deallocated -+ sub_arr2(:,:,:) = 2 -+ sub_arr3(:) = 3 -+ -+ call foo(sub_arr1, sub_arr2) -+ call foo(sub_arr1(5:10, 5:10), sub_arr2(10:15,10:15,10:15)) -+ -+ allocate (vla1 (10,10,10)) -+ allocate (vla2 (20,20)) -+ vla1(:,:,:) = 1311 -+ vla2(:,:) = 42 -+ call foo(vla2, vla1) -+ -+ call bar(sub_arr3, sub_arr1) -+end program vla_sub -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-arbitrary.exp 2015-05-29 08:27:06.268740305 +0200 -@@ -0,0 +1,35 @@ -+# Copyright 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 "vla-sub.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# Check VLA with arbitary length and check that elements outside of -+# bounds of the passed VLA can be accessed correctly. -+gdb_breakpoint [gdb_get_line_number "end-of-bar"] -+gdb_continue_to_breakpoint "end-of-bar" -+gdb_test "p array1(42)" " = 3" "print arbitary array1(42)" -+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)" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp 2015-05-29 08:27:06.268740305 +0200 -@@ -0,0 +1,49 @@ -+# Copyright 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 "vla-sub.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# "up" works with GCC but other Fortran compilers may copy the values into the -+# outer function only on the exit of the inner function. -+# We need both variants as depending on the arch we optionally may still be -+# executing the caller line or not after `finish'. -+ -+gdb_breakpoint [gdb_get_line_number "array2-almost-filled"] -+gdb_continue_to_breakpoint "array2-almost-filled" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was filled" -+gdb_test "print array2(2,1,1)=20" " = 20" \ -+ "set array(2,2,2) to 20 in subroutine" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was mofified in debugger" -+ -+gdb_test "finish" \ -+ ".*foo\\\(sub_arr1\\\(5:10, 5:10\\\), sub_arr2\\\(10:15,10:15,10:15\\\)\\\)" \ -+ "finish function" -+gdb_test "p sub_arr1(5, 7)" " = 5" "sub_arr1(5, 7) after finish" -+gdb_test "p sub_arr1(1, 1)" " = 30" "sub_arr1(1, 1) after finish" -+gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish" -+gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish" -+ -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value-sub.exp 2015-05-29 08:27:06.269740311 +0200 -@@ -0,0 +1,90 @@ -+# Copyright 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 "vla-sub.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# Check the values of VLA's in subroutine can be evaluated correctly -+ -+# Try to access values from a fixed array handled as VLA in subroutine. -+gdb_breakpoint [gdb_get_line_number "not-filled"] -+gdb_continue_to_breakpoint "not-filled (1st)" -+gdb_test "print array1" " = \\(\[()1, .\]*\\)" \ -+ "print passed array1 in foo (passed fixed array)" -+ -+gdb_breakpoint [gdb_get_line_number "array1-filled"] -+gdb_continue_to_breakpoint "array1-filled (1st)" -+gdb_test "print array1(5, 7)" " = 5" \ -+ "print array1(5, 7) after filled in foo (passed fixed array)" -+gdb_test "print array1(1, 1)" " = 30" \ -+ "print array1(1, 1) after filled in foo (passed fixed array)" -+ -+gdb_breakpoint [gdb_get_line_number "array2-almost-filled"] -+gdb_continue_to_breakpoint "array2-almost-filled (1st)" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was filled (passed fixed array)" -+gdb_test "print array2(2,1,1)=20" " = 20" \ -+ "set array(2,2,2) to 20 in subroutine (passed fixed array)" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was mofified in debugger (passed fixed array)" -+ -+ -+# Try to access values from a fixed sub-array handled as VLA in subroutine. -+gdb_continue_to_breakpoint "not-filled (2nd)" -+gdb_test "print array1" " = \\(\[()5, .\]*\\)" \ -+ "print passed array1 in foo (passed sub-array)" -+ -+gdb_continue_to_breakpoint "array1-filled (2nd)" -+gdb_test "print array1(5, 5)" " = 5" \ -+ "print array1(5, 5) after filled in foo (passed sub-array)" -+gdb_test "print array1(1, 1)" " = 30" \ -+ "print array1(1, 1) after filled in foo (passed sub-array)" -+ -+gdb_continue_to_breakpoint "array2-almost-filled (2nd)" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was filled (passed sub-array)" -+gdb_test "print array2(2,1,1)=20" " = 20" \ -+ "set array(2,2,2) to 20 in subroutine (passed sub-array)" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *20, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was mofified in debugger (passed sub-array)" -+ -+ -+# Try to access values from a VLA passed to subroutine. -+gdb_continue_to_breakpoint "not-filled (3rd)" -+gdb_test "print array1" " = \\(\[()42, .\]*\\)" \ -+ "print passed array1 in foo (passed vla)" -+ -+gdb_continue_to_breakpoint "array1-filled (3rd)" -+gdb_test "print array1(5, 5)" " = 5" \ -+ "print array1(5, 5) after filled in foo (passed vla)" -+gdb_test "print array1(1, 1)" " = 30" \ -+ "print array1(1, 1) after filled in foo (passed vla)" -+ -+gdb_continue_to_breakpoint "array2-almost-filled (3rd)" -+gdb_test "print array2" " = \\( *\\( *\\( *30, *3, *3,\[()3, .\]*\\)" \ -+ "print array2 in foo after it was filled (passed vla)" -+gdb_test "print array2(2,1,1)=20" " = 20" \ -+ "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)" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value.exp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla-value.exp 2015-05-29 08:27:06.269740311 +0200 -@@ -0,0 +1,148 @@ -+# Copyright 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 "vla.f90" -+ -+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ -+ {debug f90 quiet}] } { -+ return -1 -+} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+ -+# Try to access values in non allocated VLA -+gdb_breakpoint [gdb_get_line_number "vla1-init"] -+gdb_continue_to_breakpoint "vla1-init" -+gdb_test "print vla1" " = " "print non-allocated vla1" -+gdb_test "print &vla1" \ -+ " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(\\\)\\\)\\\) $hex" \ -+ "print non-allocated &vla1" -+gdb_test "print vla1(1,1,1)" "no such vector element because not allocated" \ -+ "print member in non-allocated vla1 (1)" -+gdb_test "print vla1(101,202,303)" \ -+ "no such vector element because not allocated" \ -+ "print member in non-allocated vla1 (2)" -+gdb_test "print vla1(5,2,18)=1" "no such vector element because not allocated" \ -+ "set member in non-allocated vla1" -+ -+# Try to access value in allocated VLA -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "next" "\\d+(\\t|\\s)+vla1\\\(3, 6, 9\\\) = 42" \ -+ "step over value assignment of vla1" -+gdb_test "print &vla1" \ -+ " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \ -+ "print allocated &vla1" -+gdb_test "print vla1(3, 6, 9)" " = 1311" "print allocated vla1(3,6,9)" -+gdb_test "print vla1(1, 3, 8)" " = 1311" "print allocated vla1(1,3,8)" -+gdb_test "print vla1(9, 9, 9) = 999" " = 999" \ -+ "print allocated vla1(9,9,9)=1" -+ -+# Try to access values in allocated VLA after specific assignment -+gdb_breakpoint [gdb_get_line_number "vla1-filled"] -+gdb_continue_to_breakpoint "vla1-filled" -+gdb_test "print vla1(3, 6, 9)" " = 42" \ -+ "print allocated vla1(3,6,9) after specific assignment (filled)" -+gdb_test "print vla1(1, 3, 8)" " = 1001" \ -+ "print allocated vla1(1,3,8) after specific assignment (filled)" -+gdb_test "print vla1(9, 9, 9)" " = 999" \ -+ "print allocated vla1(9,9,9) after assignment in debugger (filled)" -+ -+# Try to access values in undefined pointer to VLA (dangling) -+gdb_test "print pvla" " = " "print undefined pvla" -+gdb_test "print &pvla" \ -+ " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(\\\)\\\)\\\) $hex" \ -+ "print non-associated &pvla" -+gdb_test "print pvla(1, 3, 8)" "no such vector element because not associated" \ -+ "print undefined pvla(1,3,8)" -+ -+# Try to access values in pointer to VLA and compare them -+gdb_breakpoint [gdb_get_line_number "pvla-associated"] -+gdb_continue_to_breakpoint "pvla-associated" -+gdb_test "print &pvla" \ -+ " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \ -+ "print associated &pvla" -+gdb_test "print pvla(3, 6, 9)" " = 42" "print associated pvla(3,6,9)" -+gdb_test "print pvla(1, 3, 8)" " = 1001" "print associated pvla(1,3,8)" -+gdb_test "print pvla(9, 9, 9)" " = 999" "print associated pvla(9,9,9)" -+ -+# Fill values to VLA using pointer and check -+gdb_breakpoint [gdb_get_line_number "pvla-re-associated"] -+gdb_continue_to_breakpoint "pvla-re-associated" -+gdb_test "print pvla(5, 45, 20)" \ -+ " = 1" "print pvla(5, 45, 20) after filled using pointer" -+gdb_test "print vla2(5, 45, 20)" \ -+ " = 1" "print vla2(5, 45, 20) after filled using pointer" -+gdb_test "print pvla(7, 45, 14)" " = 2" \ -+ "print pvla(7, 45, 14) after filled using pointer" -+gdb_test "print vla2(7, 45, 14)" " = 2" \ -+ "print vla2(7, 45, 14) after filled using pointer" -+ -+# Try to access values of deassociated VLA pointer -+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"] -+gdb_continue_to_breakpoint "pvla-deassociated" -+gdb_test "print pvla(5, 45, 20)" \ -+ "no such vector element because not associated" \ -+ "print pvla(5, 45, 20) after deassociated" -+gdb_test "print pvla(7, 45, 14)" \ -+ "no such vector element because not associated" \ -+ "print pvla(7, 45, 14) after dissasociated" -+gdb_test "print pvla" " = " \ -+ "print vla1 after deassociated" -+ -+# Try to access values of deallocated VLA -+gdb_breakpoint [gdb_get_line_number "vla1-deallocated"] -+gdb_continue_to_breakpoint "vla1-deallocated" -+gdb_test "print vla1(3, 6, 9)" "no such vector element because not allocated" \ -+ "print allocated vla1(3,6,9) after specific assignment (deallocated)" -+gdb_test "print vla1(1, 3, 8)" "no such vector element because not allocated" \ -+ "print allocated vla1(1,3,8) after specific assignment (deallocated)" -+gdb_test "print vla1(9, 9, 9)" "no such vector element because not allocated" \ -+ "print allocated vla1(9,9,9) after assignment in debugger (deallocated)" -+ -+ -+# Try to assign VLA to user variable -+clean_restart ${testfile} -+ -+if ![runto MAIN__] then { -+ perror "couldn't run to breakpoint MAIN__" -+ continue -+} -+gdb_breakpoint [gdb_get_line_number "vla2-allocated"] -+gdb_continue_to_breakpoint "vla2-allocated" -+gdb_test "next" "\\d+.*vla1\\(3, 6, 9\\) = 42" "next (1)" -+ -+gdb_test_no_output "set \$myvar = vla1" "set \$myvar = vla1" -+gdb_test "print \$myvar" \ -+ " = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" \ -+ "print \$myvar set to vla1" -+ -+gdb_test "next" "\\d+.*vla1\\(1, 3, 8\\) = 1001" "next (2)" -+gdb_test "print \$myvar(3,6,9)" " = 1311" "print \$myvar(3,6,9)" -+ -+gdb_breakpoint [gdb_get_line_number "pvla-associated"] -+gdb_continue_to_breakpoint "pvla-associated" -+gdb_test_no_output "set \$mypvar = pvla" "set \$mypvar = pvla" -+gdb_test "print \$mypvar(1,3,8)" " = 1001" "print \$mypvar(1,3,8)" -+ -+# deallocate pointer and make sure user defined variable still has the -+# right value. -+gdb_breakpoint [gdb_get_line_number "pvla-deassociated"] -+gdb_continue_to_breakpoint "pvla-deassociated" -+gdb_test "print \$mypvar(1,3,8)" " = 1001" \ -+ "print \$mypvar(1,3,8) after deallocated" -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla.f90 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.fortran/vla.f90 2015-05-29 08:27:06.269740311 +0200 -@@ -0,0 +1,56 @@ -+! Copyright 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 . -+ -+program vla -+ real, target, allocatable :: vla1 (:, :, :) -+ real, target, allocatable :: vla2 (:, :, :) -+ real, target, allocatable :: vla3 (:, :) -+ real, pointer :: pvla (:, :, :) -+ logical :: l -+ -+ allocate (vla1 (10,10,10)) ! vla1-init -+ l = allocated(vla1) -+ -+ allocate (vla2 (1:7,42:50,13:35)) ! vla1-allocated -+ l = allocated(vla2) -+ -+ vla1(:, :, :) = 1311 ! vla2-allocated -+ vla1(3, 6, 9) = 42 -+ vla1(1, 3, 8) = 1001 -+ vla1(6, 2, 7) = 13 -+ -+ vla2(:, :, :) = 1311 ! vla1-filled -+ vla2(5, 45, 20) = 42 -+ -+ pvla => vla1 ! vla2-filled -+ l = associated(pvla) -+ -+ pvla => vla2 ! pvla-associated -+ l = associated(pvla) -+ pvla(5, 45, 20) = 1 -+ pvla(7, 45, 14) = 2 -+ -+ pvla => null() ! pvla-re-associated -+ l = associated(pvla) -+ -+ deallocate (vla1) ! pvla-deassociated -+ l = allocated(vla1) -+ -+ deallocate (vla2) ! vla1-deallocated -+ l = allocated(vla2) -+ -+ allocate (vla3 (2,2)) ! vla2-deallocated -+ vla3(:,:) = 13 -+end program vla -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/mi-vla-fortran.exp +Index: gdb-7.10.50.20160106/gdb/typeprint.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/mi-vla-fortran.exp 2015-05-29 11:13:53.951656591 +0200 -@@ -0,0 +1,181 @@ -+# Copyright 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 . -+ -+# Verify that, using the MI, we can evaluate a simple C Variable Length -+# Array (VLA). -+ -+load_lib mi-support.exp -+set MIFLAGS "-i=mi" -+ -+gdb_exit -+if [mi_gdb_start] { -+ continue -+} -+ -+standard_testfile vla.f90 -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ -+ {debug f90}] != "" } { -+ untested mi-vla-fortran.exp -+ return -1 -+} -+ -+mi_delete_breakpoints -+mi_gdb_reinitialize_dir $srcdir/$subdir -+mi_gdb_load ${binfile} -+ -+set bp_lineno [gdb_get_line_number "vla1-not-allocated"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 1 "del" "vla" \ -+ ".*vla.f90" $bp_lineno $hex \ -+ "insert breakpoint at line $bp_lineno (vla not allocated)" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "500-data-evaluate-expression vla1" \ -+ "500\\^done,value=\"\"" "evaluate not allocated vla" -+ -+mi_create_varobj_checked vla1_not_allocated vla1 "" \ -+ "create local variable vla1_not_allocated" -+mi_gdb_test "501-var-info-type vla1_not_allocated" \ -+ "501\\^done,type=\"\"" \ -+ "info type variable vla1_not_allocated" -+mi_gdb_test "502-var-show-format vla1_not_allocated" \ -+ "502\\^done,format=\"natural\"" \ -+ "show format variable vla1_not_allocated" -+mi_gdb_test "503-var-evaluate-expression vla1_not_allocated" \ -+ "503\\^done,value=\"\\\[0\\\]\"" \ -+ "eval variable vla1_not_allocated" -+mi_list_array_varobj_children_with_index "vla1_not_allocated" "0" "1" \ -+ "real\\\(kind=4\\\)" "get children of vla1_not_allocated" -+ -+ -+ -+set bp_lineno [gdb_get_line_number "vla1-allocated"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 2 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno (vla allocated)" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+# Content of 'vla1' is uninitialized here. -+ -+mi_create_varobj_checked vla1_allocated vla1 "real\\\(kind=4\\\) \\\(5\\\)" \ -+ "create local variable vla1_allocated" -+mi_gdb_test "511-var-info-type vla1_allocated" \ -+ "511\\^done,type=\"real\\\(kind=4\\\) \\\(5\\\)\"" \ -+ "info type variable vla1_allocated" -+mi_gdb_test "512-var-show-format vla1_allocated" \ -+ "512\\^done,format=\"natural\"" \ -+ "show format variable vla1_allocated" -+mi_gdb_test "513-var-evaluate-expression vla1_allocated" \ -+ "513\\^done,value=\"\\\[5\\\]\"" \ -+ "eval variable vla1_allocated" -+mi_list_array_varobj_children_with_index "vla1_allocated" "5" "1" \ -+ "real\\\(kind=4\\\)" "get children of vla1_allocated" -+ -+ -+set bp_lineno [gdb_get_line_number "vla1-filled"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 3 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "520-data-evaluate-expression vla1" \ -+ "520\\^done,value=\"\\(1, 1, 1, 1, 1\\)\"" "evaluate filled vla" -+ -+ -+set bp_lineno [gdb_get_line_number "vla1-modified"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 4 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "530-data-evaluate-expression vla1" \ -+ "530\\^done,value=\"\\(1, 42, 1, 24, 1\\)\"" "evaluate filled vla" -+mi_gdb_test "540-data-evaluate-expression vla1(1)" \ -+ "540\\^done,value=\"1\"" "evaluate filled vla" -+mi_gdb_test "550-data-evaluate-expression vla1(2)" \ -+ "550\\^done,value=\"42\"" "evaluate filled vla" -+mi_gdb_test "560-data-evaluate-expression vla1(4)" \ -+ "560\\^done,value=\"24\"" "evaluate filled vla" -+ -+ -+set bp_lineno [gdb_get_line_number "vla1-deallocated"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 5 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "570-data-evaluate-expression vla1" \ -+ "570\\^done,value=\"\"" "evaluate not allocated vla" -+ -+ -+set bp_lineno [gdb_get_line_number "pvla2-not-associated"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 6 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "580-data-evaluate-expression pvla2" \ -+ "580\\^done,value=\"\"" "evaluate not associated vla" -+ -+mi_create_varobj_checked pvla2_not_associated pvla2 "" \ -+ "create local variable pvla2_not_associated" -+mi_gdb_test "581-var-info-type pvla2_not_associated" \ -+ "581\\^done,type=\"\"" \ -+ "info type variable pvla2_not_associated" -+mi_gdb_test "582-var-show-format pvla2_not_associated" \ -+ "582\\^done,format=\"natural\"" \ -+ "show format variable pvla2_not_associated" -+mi_gdb_test "583-var-evaluate-expression pvla2_not_associated" \ -+ "583\\^done,value=\"\\\[0\\\]\"" \ -+ "eval variable pvla2_not_associated" -+mi_list_array_varobj_children_with_index "pvla2_not_associated" "0" "1" \ -+ "real\\\(kind=4\\\)" "get children of pvla2_not_associated" -+ -+ -+set bp_lineno [gdb_get_line_number "pvla2-associated"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 7 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "590-data-evaluate-expression pvla2" \ -+ "590\\^done,value=\"\\(\\( 2, 2, 2, 2, 2\\) \\( 2, 2, 2, 2, 2\\) \\)\"" \ -+ "evaluate associated vla" -+ -+mi_create_varobj_checked pvla2_associated pvla2 \ -+ "real\\\(kind=4\\\) \\\(5,2\\\)" "create local variable pvla2_associated" -+mi_gdb_test "591-var-info-type pvla2_associated" \ -+ "591\\^done,type=\"real\\\(kind=4\\\) \\\(5,2\\\)\"" \ -+ "info type variable pvla2_associated" -+mi_gdb_test "592-var-show-format pvla2_associated" \ -+ "592\\^done,format=\"natural\"" \ -+ "show format variable pvla2_associated" -+mi_gdb_test "593-var-evaluate-expression pvla2_associated" \ -+ "593\\^done,value=\"\\\[2\\\]\"" \ -+ "eval variable pvla2_associated" -+ -+ -+set bp_lineno [gdb_get_line_number "pvla2-set-to-null"] -+mi_create_breakpoint "-t vla.f90:$bp_lineno" 8 "del" "vla" ".*vla.f90" \ -+ $bp_lineno $hex "insert breakpoint at line $bp_lineno" -+mi_run_cmd -+mi_expect_stop "breakpoint-hit" "vla" "" ".*vla.f90" "$bp_lineno" \ -+ { "" "disp=\"del\"" } "run to breakpoint at line $bp_lineno" -+mi_gdb_test "600-data-evaluate-expression pvla2" \ -+ "600\\^done,value=\"\"" "evaluate vla pointer set to null" -+ -+mi_gdb_exit -+return 0 -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/vla.f90 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.mi/vla.f90 2015-05-29 08:27:06.270740317 +0200 -@@ -0,0 +1,42 @@ -+! Copyright 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 . -+ -+program vla -+ real, allocatable :: vla1 (:) -+ real, target, allocatable :: vla2(:, :) -+ real, pointer :: pvla2 (:, :) -+ logical :: l -+ -+ allocate (vla1 (5)) ! vla1-not-allocated -+ l = allocated(vla1) ! vla1-allocated -+ -+ vla1(:) = 1 -+ vla1(2) = 42 ! vla1-filled -+ vla1(4) = 24 -+ -+ deallocate (vla1) ! vla1-modified -+ l = allocated(vla1) ! vla1-deallocated -+ -+ allocate (vla2 (5, 2)) -+ vla2(:, :) = 2 -+ -+ pvla2 => vla2 ! pvla2-not-associated -+ l = associated(pvla2) ! pvla2-associated -+ -+ pvla2(2, 1) = 42 -+ -+ pvla2 => null() -+ l = associated(pvla2) ! pvla2-set-to-null -+end program vla -Index: gdb-7.9.50.20150520/gdb/typeprint.c -=================================================================== ---- gdb-7.9.50.20150520.orig/gdb/typeprint.c 2015-05-29 08:27:02.688717523 +0200 -+++ gdb-7.9.50.20150520/gdb/typeprint.c 2015-05-29 08:27:06.270740317 +0200 -@@ -458,6 +458,13 @@ whatis_exp (char *exp, int show) +--- gdb-7.10.50.20160106.orig/gdb/typeprint.c 2016-01-08 19:15:35.086582476 +0100 ++++ gdb-7.10.50.20160106/gdb/typeprint.c 2016-01-08 19:15:44.984637686 +0100 +@@ -460,6 +460,13 @@ type = value_type (val); @@ -2650,14 +1237,14 @@ Index: gdb-7.9.50.20150520/gdb/typeprint.c get_user_print_options (&opts); if (opts.objectprint) { -Index: gdb-7.9.50.20150520/gdb/valarith.c +Index: gdb-7.10.50.20160106/gdb/valarith.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/valarith.c 2015-05-29 08:27:02.689717530 +0200 -+++ gdb-7.9.50.20150520/gdb/valarith.c 2015-05-29 08:27:06.271740324 +0200 -@@ -193,12 +193,31 @@ value_subscripted_rvalue (struct value * +--- gdb-7.10.50.20160106.orig/gdb/valarith.c 2016-01-08 19:15:35.087582482 +0100 ++++ gdb-7.10.50.20160106/gdb/valarith.c 2016-01-08 19:15:44.985637691 +0100 +@@ -193,9 +193,21 @@ 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); + unsigned int elt_size = type_length_units (elt_type); - unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound); + unsigned int elt_offs = longest_to_int (index - lowerbound); + LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)); @@ -2675,26 +1262,15 @@ Index: gdb-7.9.50.20150520/gdb/valarith.c + elt_offs *= elt_size; + if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) - && elt_offs >= TYPE_LENGTH (array_type))) -- error (_("no such vector element")); -+ { -+ if (TYPE_NOT_ASSOCIATED (array_type)) -+ error (_("no such vector element because not associated")); -+ else if (TYPE_NOT_ALLOCATED (array_type)) -+ error (_("no such vector element because not allocated")); -+ else -+ error (_("no such vector element")); -+ } - - if (VALUE_LVAL (array) == lval_memory && value_lazy (array)) - v = allocate_value_lazy (elt_type); -Index: gdb-7.9.50.20150520/gdb/valprint.c + && elt_offs >= type_length_units (array_type))) + { +Index: gdb-7.10.50.20160106/gdb/valprint.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/valprint.c 2015-05-29 08:27:02.690717536 +0200 -+++ gdb-7.9.50.20150520/gdb/valprint.c 2015-05-29 08:27:06.271740324 +0200 -@@ -303,6 +303,18 @@ valprint_check_validity (struct ui_file - { - CHECK_TYPEDEF (type); +--- gdb-7.10.50.20160106.orig/gdb/valprint.c 2016-01-08 19:15:35.088582487 +0100 ++++ gdb-7.10.50.20160106/gdb/valprint.c 2016-01-08 19:15:44.986637697 +0100 +@@ -316,6 +316,18 @@ + return 0; + } + if (TYPE_NOT_ASSOCIATED (type)) + { @@ -2711,26 +1287,7 @@ Index: gdb-7.9.50.20150520/gdb/valprint.c if (TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_ARRAY) -@@ -359,6 +371,18 @@ val_print_invalid_address (struct ui_fil - fprintf_filtered (stream, _("")); - } - -+void -+val_print_not_allocated (struct ui_file *stream) -+{ -+ fprintf_filtered (stream, _("")); -+} -+ -+void -+val_print_not_associated (struct ui_file *stream) -+{ -+ fprintf_filtered (stream, _("")); -+} -+ - /* 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 -@@ -802,12 +826,16 @@ static int +@@ -1025,12 +1037,16 @@ value_check_printable (struct value *val, struct ui_file *stream, const struct value_print_options *options) { @@ -2747,10 +1304,12 @@ Index: gdb-7.9.50.20150520/gdb/valprint.c if (value_entirely_optimized_out (val)) { if (options->summary && !val_print_scalar_type_p (value_type (val))) -@@ -833,6 +861,18 @@ value_check_printable (struct value *val +@@ -1066,6 +1082,18 @@ + { + val_print_not_allocated (stream); return 0; - } - ++ } ++ + if (TYPE_NOT_ASSOCIATED (type)) + { + val_print_not_associated (stream); @@ -2761,16 +1320,14 @@ Index: gdb-7.9.50.20150520/gdb/valprint.c + { + val_print_not_allocated (stream); + return 0; -+ } -+ - return 1; - } + } -Index: gdb-7.9.50.20150520/gdb/valprint.h + return 1; +Index: gdb-7.10.50.20160106/gdb/valprint.h =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/valprint.h 2015-05-29 08:27:02.691717543 +0200 -+++ gdb-7.9.50.20150520/gdb/valprint.h 2015-05-29 08:27:06.272740330 +0200 -@@ -232,4 +232,8 @@ extern void print_command_parse_format ( +--- gdb-7.10.50.20160106.orig/gdb/valprint.h 2016-01-08 19:15:35.088582487 +0100 ++++ gdb-7.10.50.20160106/gdb/valprint.h 2016-01-08 19:15:44.986637697 +0100 +@@ -232,4 +232,8 @@ struct format_data *fmtp); extern void print_value (struct value *val, const struct format_data *fmtp); @@ -2779,10 +1336,10 @@ Index: gdb-7.9.50.20150520/gdb/valprint.h +extern void val_print_not_associated (struct ui_file *stream); + #endif -Index: gdb-7.9.50.20150520/gdb/value.c +Index: gdb-7.10.50.20160106/gdb/value.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-29 08:27:02.693717555 +0200 -+++ gdb-7.9.50.20150520/gdb/value.c 2015-05-29 08:27:06.273740337 +0200 +--- gdb-7.10.50.20160106.orig/gdb/value.c 2016-01-08 19:15:35.090582499 +0100 ++++ gdb-7.10.50.20160106/gdb/value.c 2016-01-08 19:15:44.987637702 +0100 @@ -40,6 +40,7 @@ #include "tracepoint.h" #include "cp-abi.h" @@ -2791,7 +1348,7 @@ Index: gdb-7.9.50.20150520/gdb/value.c /* Prototypes for exported functions. */ -@@ -1776,6 +1777,25 @@ set_value_component_location (struct val +@@ -1788,6 +1789,25 @@ if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -2817,14 +1374,14 @@ Index: gdb-7.9.50.20150520/gdb/value.c } -@@ -3080,13 +3100,22 @@ value_primitive_field (struct value *arg +@@ -3095,13 +3115,22 @@ v = allocate_value_lazy (type); else { - v = allocate_value (type); - value_contents_copy_raw (v, value_embedded_offset (v), - arg1, value_embedded_offset (arg1) + offset, -- TYPE_LENGTH (type)); +- type_length_units (type)); + if (TYPE_DATA_LOCATION (type) + && TYPE_DATA_LOCATION_KIND (type) == PROP_CONST) + v = value_at_lazy (type, value_address (arg1) + offset); @@ -2833,7 +1390,7 @@ Index: gdb-7.9.50.20150520/gdb/value.c + v = allocate_value (type); + value_contents_copy_raw (v, value_embedded_offset (v), + arg1, value_embedded_offset (arg1) + offset, -+ TYPE_LENGTH (type)); ++ type_length_units (type)); + } } - v->offset = (value_offset (arg1) + offset @@ -2846,7 +1403,7 @@ Index: gdb-7.9.50.20150520/gdb/value.c } set_value_component_location (v, arg1); VALUE_REGNUM (v) = VALUE_REGNUM (arg1); -@@ -3674,7 +3703,8 @@ readjust_indirect_value_type (struct val +@@ -3689,7 +3718,8 @@ struct value *original_value) { /* Re-adjust type. */ @@ -2856,7 +1413,7 @@ Index: gdb-7.9.50.20150520/gdb/value.c /* Add embedding info. */ set_value_enclosing_type (value, enc_type); -@@ -3691,6 +3721,12 @@ coerce_ref (struct value *arg) +@@ -3706,6 +3736,12 @@ struct value *retval; struct type *enc_type; @@ -2869,7 +1426,7 @@ Index: gdb-7.9.50.20150520/gdb/value.c retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3825,8 +3861,14 @@ value_fetch_lazy (struct value *val) +@@ -3834,8 +3870,14 @@ } else if (VALUE_LVAL (val) == lval_memory) { @@ -2885,12 +1442,12 @@ Index: gdb-7.9.50.20150520/gdb/value.c if (TYPE_LENGTH (type)) read_value_memory (val, 0, value_stack (val), -Index: gdb-7.9.50.20150520/gdb/dwarf2loc.c +Index: gdb-7.10.50.20160106/gdb/dwarf2loc.c =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/dwarf2loc.c 2015-05-29 08:27:02.694717562 +0200 -+++ gdb-7.9.50.20150520/gdb/dwarf2loc.c 2015-05-29 08:27:06.274740343 +0200 -@@ -2294,6 +2294,11 @@ dwarf2_evaluate_loc_desc_full (struct ty - int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); +--- gdb-7.10.50.20160106.orig/gdb/dwarf2loc.c 2016-01-08 19:15:35.091582504 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2loc.c 2016-01-08 19:15:44.988637708 +0100 +@@ -2368,6 +2368,11 @@ + address = value_as_address (value_from_pointer (ptr_type, address)); do_cleanups (value_chain); + @@ -2901,7 +1458,7 @@ Index: gdb-7.9.50.20150520/gdb/dwarf2loc.c retval = value_at_lazy (type, address + byte_offset); if (in_stack_memory) set_value_stack (retval, 1); -@@ -2577,6 +2582,19 @@ dwarf2_compile_property_to_c (struct ui_ +@@ -2660,6 +2665,19 @@ data, data + size, per_cu); } diff --git a/SPECS/gdb.spec b/SPECS/gdb.spec index 2ca41b0..a059ccd 100644 --- a/SPECS/gdb.spec +++ b/SPECS/gdb.spec @@ -1,5 +1,6 @@ # rpmbuild parameters: # --with testsuite: Run the testsuite (biarch if possible). Default is without. +# --with buildisa: Use %%{?_isa} for BuildRequires # --with asan: gcc -fsanitize=address # --without python: No python support. # --with profile: gcc -fprofile-generate / -fprofile-use: Before better @@ -11,22 +12,22 @@ %global pkg_name %{name} %global _root_prefix %{_prefix} %global _root_datadir %{_datadir} - %global _root_bindir %{_bindir} + %global _root_libdir %{_libdir} } Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20150706 +%global snapsrc 20160210 # See timestamp of source gnulib installed into gdb/gnulib/ . -%global snapgnulib 20121213 +%global snapgnulib 20150822 %global tarname gdb-%{version} -Version: 7.10 +Version: 7.11 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 20%{?dist} +Release: 67%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -36,10 +37,6 @@ Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gnu.org/software/gdb/ -%if "%{scl}" == "devtoolset-1.1" -Obsoletes: devtoolset-1.0-%{pkg_name} -%endif - # For our convenience %global gdb_src %{tarname} %global gdb_build build-%{_target_platform} @@ -68,6 +65,9 @@ Provides: bundled(binutils) = %{snapsrc} # https://fedorahosted.org/fpc/ticket/130 Provides: bundled(md5-gcc) = %{snapsrc} +# https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25.7B_isa.7D +%global buildisa %{?_with_buildisa:%{?_isa}} + %if 0%{!?rhel:1} || 0%{?rhel} > 7 Recommends: gcc-gdb-plugin%{?_isa} Recommends: dnf-command(debuginfo-install) @@ -79,7 +79,7 @@ Recommends: default-yama-scope %global librpmver 1 %else # FIXME: %elif does not work. -%if 0%{?el7:1} || 0%{?fc23:1} +%if 0%{?el7:1} %global librpmver 3 %else %global librpmver 7 @@ -90,7 +90,10 @@ Recommends: default-yama-scope %else %global librpmname librpm.so.%{librpmver} %endif +BuildRequires: rpm-libs%{buildisa} +%if 0%{?_with_buildisa:1} BuildRequires: %{librpmname} +%endif %if 0%{!?rhel:1} || 0%{?rhel} > 7 Recommends: %{librpmname} %endif @@ -238,16 +241,12 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch # Backported fixups post the source tarball. #Xdrop: Just backports. -#Patch232: gdb-upstream.patch +Patch232: gdb-upstream.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest+ppc Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch -# Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832) -#=push+work: Upstream should have backward compat. API: libc-alpha: <20070127104539.GA9444@.*> -Patch235: gdb-6.3-bz231832-obstack-2gb.patch - # Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). #=fedoratest Patch245: gdb-6.6-bz229517-gcore-without-terminal.patch @@ -348,11 +347,8 @@ Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch #=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch . Patch331: gdb-6.8-quit-never-aborts.patch -# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). -#=fedora -Patch335: gdb-rhel5-compat.patch - # [RHEL5,RHEL6] Fix attaching to stopped processes. +# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). #=fedora Patch337: gdb-6.8-attach-signalled-detach-stopped.patch @@ -517,11 +513,18 @@ Patch848: gdb-dts-rhel6-python-compat.patch Patch852: gdb-gnat-dwarf-crash-3of3.patch # VLA (Fortran dynamic arrays) from Intel + archer-jankratochvil-vla tests. +Patch1058: gdb-fortran-stride-intel-1of6.patch +Patch1059: gdb-fortran-stride-intel-2of6.patch +Patch1060: gdb-fortran-stride-intel-3of6.patch +Patch1061: gdb-fortran-stride-intel-4of6.patch +Patch1062: gdb-fortran-stride-intel-5of6.patch +Patch1063: gdb-fortran-stride-intel-6of6.patch Patch888: gdb-vla-intel.patch Patch983: gdb-vla-intel-logical-not.patch Patch889: gdb-vla-intel-stringbt-fix.patch Patch912: gdb-vla-intel-04of23-fix.patch Patch887: gdb-archer-vla-tests.patch +Patch1069: gdb-fortran-stride-intel-6of6-nokfail.patch # Continue backtrace even if a frame filter throws an exception (Phil Muldoon). Patch918: gdb-btrobust.patch @@ -538,33 +541,52 @@ Patch978: gdb-jit-reader-multilib.patch # Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). Patch1044: gdb-pahole-python2.patch +# Force libncursesw over libncurses to match the includes (RH BZ 1270534). +Patch1056: gdb-fedora-libncursesw.patch + +# Test clflushopt instruction decode (for RH BZ 1262471). +Patch1073: gdb-opcodes-clflushopt-test.patch + +# [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). +Patch1075: gdb-testsuite-readline63-sigint.patch + +# [aarch64] Fix hardware watchpoints (RH BZ 1261564). +#=fedoratest +Patch1113: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch + +# Fix non-stop gdb -p : internal error (pedro Alves, RH BZ 1318049). +Patch1117: gdb-rhbz1318049-gdb-p-container-internal-error.patch + +# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). +Patch1118: gdb-container-rh-pkg.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch # --with-system-readline -BuildRequires: readline-devel%{?_isa} >= 6.2-4 +BuildRequires: readline-devel%{buildisa} >= 6.2-4 %endif # 0%{!?rhel:1} || 0%{?rhel} > 6 -BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison -BuildRequires: expat-devel%{?_isa} +BuildRequires: ncurses-devel%{buildisa} texinfo gettext flex bison +BuildRequires: expat-devel%{buildisa} %if 0%{!?rhel:1} || 0%{?rhel} > 6 -BuildRequires: xz-devel%{?_isa} +BuildRequires: xz-devel%{buildisa} %endif # dlopen() no longer makes rpm-libsFIXME{?_isa} (it's .so) a mandatory dependency. -BuildRequires: rpm-devel%{?_isa} -BuildRequires: zlib-devel%{?_isa} libselinux-devel%{?_isa} +BuildRequires: rpm-devel%{buildisa} +BuildRequires: zlib-devel%{buildisa} libselinux-devel%{buildisa} %if 0%{!?_without_python:1} %if 0%{?rhel:1} && 0%{?rhel} <= 7 -BuildRequires: python-devel%{?_isa} +BuildRequires: python-devel%{buildisa} %else %global __python %{__python3} -BuildRequires: python3-devel%{?_isa} +BuildRequires: python3-devel%{buildisa} %endif %if 0%{?rhel:1} && 0%{?rhel} <= 7 # Temporarily before python files get moved to libstdc++.rpm # libstdc++%{bits_other} is not present in Koji, the .spec script generating # gdb/python/libstdcxx/ also does not depend on the %{bits_other} files. -BuildRequires: libstdc++%{?_isa} +BuildRequires: libstdc++%{buildisa} %endif # 0%{?rhel:1} && 0%{?rhel} <= 7 %endif # 0%{!?_without_python:1} # gdb-doc in PDF, see: https://bugzilla.redhat.com/show_bug.cgi?id=919891#c10 @@ -575,8 +597,15 @@ BuildRequires: texlive-collection-latexrecommended # Permit rebuilding *.[0-9] files even if they are distributed in gdb-*.tar: BuildRequires: /usr/bin/pod2man %if 0%{!?rhel:1} -BuildRequires: libbabeltrace-devel%{?_isa} -BuildRequires: guile-devel%{?_isa} +BuildRequires: libbabeltrace-devel%{buildisa} +BuildRequires: guile-devel%{buildisa} +%endif +%global have_libipt 0 +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +%ifarch %{ix86} x86_64 +%global have_libipt 1 +BuildRequires: libipt-devel%{buildisa} +%endif %endif %if 0%{?_with_testsuite:1} @@ -599,15 +628,17 @@ BuildRequires: guile-devel%{?_isa} BuildRequires: sharutils dejagnu # gcc-objc++ is not covered by the GDB testsuite. BuildRequires: gcc gcc-c++ gcc-gfortran gcc-objc +%if 0%{!?rhel:1} || 0%{?rhel} > 7 BuildRequires: gcc-gdb-plugin%{?_isa} +%endif %if 0%{?rhel:1} && 0%{?rhel} < 7 BuildRequires: gcc-java libgcj%{bits_local} libgcj%{bits_other} # for gcc-java linkage: BuildRequires: zlib-devel%{bits_local} zlib-devel%{bits_other} %endif %if 0%{!?rhel:1} || 0%{?rhel} > 6 -# Fedora ppc64le does not yet have gcc-go built. -%ifnarch ppc64le +# These Fedoras do not yet have gcc-go built. +%ifnarch ppc64le aarch64 BuildRequires: gcc-go %endif %endif @@ -623,6 +654,10 @@ BuildRequires: prelink %endif %endif %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 7 +BuildRequires: libmpx%{bits_local} libmpx%{bits_other} +BuildRequires: opencl-headers ocl-icd-devel%{bits_local} ocl-icd-devel%{bits_other} +%endif %if 0%{!?rhel:1} # Fedora arm+ppc64le do not yet have fpc built. %ifnarch %{arm} ppc64le @@ -639,8 +674,8 @@ BuildRequires: libgcc%{bits_local} libgcc%{bits_other} # libstdc++-devel of matching bits is required only for g++ -static. BuildRequires: libstdc++%{bits_local} libstdc++%{bits_other} %if 0%{!?rhel:1} || 0%{?rhel} > 6 -# Fedora ppc64le does not yet have gcc-go built. -%ifnarch ppc64le +# These Fedoras do not yet have gcc-go built. +%ifnarch ppc64le aarch64 BuildRequires: libgo-devel%{bits_local} libgo-devel%{bits_other} %endif %endif @@ -669,10 +704,6 @@ and printing their data. Summary: A standalone server for GDB (the GNU source-level debugger) Group: Development/Debuggers -%if "%{scl}" == "devtoolset-1.1" -Obsoletes: devtoolset-1.0-%{pkg_name}-gdbserver -%endif - %description gdbserver GDB, the GNU debugger, allows you to debug programs written in C, C++, Java, and other languages, by executing them in a controlled fashion @@ -689,10 +720,6 @@ BuildArch: noarch Requires(post): /sbin/install-info Requires(preun): /sbin/install-info -%if "%{scl}" == "devtoolset-1.1" -Obsoletes: devtoolset-1.0-%{pkg_name}-doc -%endif - %description doc GDB, the GNU debugger, allows you to debug programs written in C, C++, Java, and other languages, by executing them in a controlled fashion @@ -720,8 +747,14 @@ find -name "*.info*"|xargs rm -f # Match the Fedora's version info. %patch2 -p1 -#patch232 -p1 +%patch232 -p1 %patch349 -p1 +%patch1058 -p1 +%patch1059 -p1 +%patch1060 -p1 +%patch1061 -p1 +%patch1062 -p1 +%patch1063 -p1 %patch888 -p1 %patch983 -p1 %patch889 -p1 @@ -752,7 +785,6 @@ find -name "*.info*"|xargs rm -f %patch229 -p1 %patch231 -p1 %patch234 -p1 -%patch235 -p1 %patch245 -p1 %patch247 -p1 %patch254 -p1 @@ -820,34 +852,25 @@ find -name "*.info*"|xargs rm -f %patch852 -p1 %patch863 -p1 %patch887 -p1 +%patch1069 -p1 %patch918 -p1 %patch925 -p1 %patch927 -p1 %patch978 -p1 - +%patch1056 -p1 +%patch1073 -p1 %patch848 -p1 -%if 0%{!?el6:1} -%patch848 -p1 -R -%endif %patch833 -p1 -%if 0%{!?el6:1} || 0%{!?scl:1} -%patch833 -p1 -R -%endif %patch642 -p1 -%if 0%{?rhel:1} && 0%{?rhel} <= 6 -%patch642 -p1 -R -%endif %patch337 -p1 %patch331 -p1 -%patch335 -p1 -%if 0%{!?rhel:1} || 0%{?rhel} > 6 -%patch335 -p1 -R -%patch331 -p1 -R -%patch337 -p1 -R -%endif +%patch1075 -p1 +%patch1113 -p1 +%patch1117 -p1 +%patch1118 -p1 + +%if 0%{?rhel:1} && 0%{?rhel} <= 7 %patch1044 -p1 -%if 0%{!?rhel:1} || 0%{?rhel} > 7 -%patch1044 -p1 -R %endif find -name "*.orig" | xargs rm -f @@ -884,6 +907,8 @@ rm -rf zlib %build rm -rf %{buildroot} +test -e %{_root_libdir}/librpm.so.%{librpmver} + # Identify the build directory with the version of gdb as well as the # architecture, to allow for mutliple versions to be installed and # built. @@ -902,6 +927,22 @@ export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}" CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" %endif +# Patch833: gdb-6.6-buildid-locate-rpm-scl.patch +%if 0%{?el6:1} && 0%{?scl:1} +CFLAGS="$CFLAGS -DGDB_INDEX_VERIFY_VENDOR" +%endif + +# Patch642: gdb-readline62-ask-more-rh.patch +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +CFLAGS="$CFLAGS -DNEED_RL_STATE_FEDORA_GDB" +%endif + +# Patch337: gdb-6.8-attach-signalled-detach-stopped.patch +# Patch331: gdb-6.8-quit-never-aborts.patch +%if 0%{?rhel:1} && 0%{?rhel} <= 6 +CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP" +%endif + # --htmldir and --pdfdir are not used as they are used from %{gdb_build}. ../configure \ --prefix=%{_prefix} \ @@ -958,6 +999,11 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \ --disable-inprocess-agent \ %endif --with-system-zlib \ +%if %{have_libipt} + --with-intel-pt \ +%else + --without-intel-pt \ +%endif --with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ --with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \ %ifarch sparc sparcv9 @@ -1239,6 +1285,13 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/elinos.py rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/wrs-linux.py rmdir $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit +# Patch848: gdb-dts-rhel6-python-compat.patch +%if 0%{!?el6:1} +rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/FrameWrapper.py +rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/backtrace.py +rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -1332,20 +1385,167 @@ then fi %changelog -* Thu Sep 24 2015 Jan Kratochvil - 7.10-20.el7 -- [rhel6,rhel7] Keep pahole.py and make it Python2 compatible. +* Tue May 3 2016 Jan Kratochvil - 7.11-67.el{6,7} +- Fix messages suggesting more recent RHEL gdbserver (RH BZ 1321114). + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-66.fc24 +- Import upstream 7.11 branch stable fixes. + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-65.fc24 +- Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). + +* Wed Apr 6 2016 Jan Kratochvil - 7.11-64.fc24 +- Fix non-stop gdb -p : internal error (Pedro Alves, RH BZ 1318049). + +* Sat Mar 19 2016 Jan Kratochvil - 7.11-63.fc24 +- .spec cleanup: Drop strict-aliasing GCC bug workaround (from RH BZ 1315191). + +* Fri Mar 18 2016 Jan Kratochvil - 7.11-62.fc24 +- .spec cleanup: Drop SCL obsoletes of devtoolset-1.1*: *-1.0* + +* Thu Mar 17 2016 Jan Kratochvil - 7.11-61.fc24 +- Add message suggesting gdbserver for non-matching PID namespaces. + +* Tue Mar 15 2016 Jan Kratochvil - 7.11-60.fc24 +- New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp +- Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves). + +* Tue Mar 8 2016 Jan Kratochvil - 7.11-59.fc24 +- Fix strict-aliasing rules compilation error (RH BZ 1315191). + +* Fri Feb 26 2016 Jan Kratochvil - 7.11-58.fc24 +- Rebase VLA (Fortran dynamic arrays) strides (multi-dim. subarrays) from Intel. + +* Thu Feb 25 2016 Jan Kratochvil - 7.11-57.fc24 +- Release bump only. + +* Wed Feb 24 2016 Jan Kratochvil - 7.11-56.fc24 +- Release bump only. + +* Wed Feb 24 2016 Jan Kratochvil - 7.11-55.fc24 +- Rebase to released FSF GDB 7.11. + +* Tue Feb 16 2016 Jan Kratochvil - 7.10.90.20160216-54.fc24 +- Rebase to FSF GDB 7.10.90.20160216 (pre-7.11 branch snapshot). + +* Tue Feb 16 2016 Jan Kratochvil - 7.10.90.20160211-53.fc24 +- Drop gdb-testsuite-subdirs-revert.patch. + +* Sat Feb 13 2016 Jan Kratochvil - 7.10.90.20160211-52.fc24 +- Rebase to FSF GDB 7.10.90.20160211 (pre-7.11 branch snapshot). + +* Wed Feb 03 2016 Fedora Release Engineering - 7.10.50.20160131-51.fc24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160131-50.fc24 +- Rebase to FSF GDB 7.10.50.20160131 (trunk snapshot). + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-49.fc24 +- Fix another false gcc6 compilation warning (Mark Wielaard). + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-48.fc24 +- Fix false gcc6 compilation warning for: bfd/elf64-s390.c + +* Sun Jan 31 2016 Jan Kratochvil - 7.10.50.20160121-47.fc24 +- [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). + +* Fri Jan 22 2016 Jan Kratochvil - 7.10.50.20160121-46.fc24 +- Fix gdb.gdb/selftest.exp false FAIL. + +* Fri Jan 22 2016 Jan Kratochvil - 7.10.50.20160121-45.fc24 +- Rebase to FSF GDB 7.10.50.20160121 (trunk snapshot). -* Wed Sep 23 2015 Jan Kratochvil - 7.10-19.el7 -- [rhel6,rhel7] Revert: Delete pahole.py on Python2 systems. +* Wed Jan 20 2016 Jan Kratochvil - 7.10.50.20160106-44.fc24 +- Suppress librpm non-absolute filename warnings for /^remote:/ filenames. -* Wed Sep 23 2015 Jan Kratochvil - 7.10-18.el7 +* Sat Jan 16 2016 Jan Kratochvil - 7.10.50.20160106-43.fc24 +- Test clflushopt instruction decode (for RH BZ 1262471). + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-42.fc24 +- Simplify .spec: Remove conditional revert of: gdb-pahole-python2.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-41.fc24 +- Simplify .spec: Remove conditional revert of: gdb-6.8-attach-signalled-detach-stopped.patch +- Simplify .spec: Remove conditional revert of: gdb-6.8-quit-never-aborts.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-40.fc24 +- Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-39.fc24 +- Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-38.fc24 +- Simplify .spec: Remove conditional revert of: gdb-6.6-buildid-locate-rpm-scl.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-37.fc24 +- Simplify .spec: Remove conditional revert of: gdb-dts-rhel6-python-compat.patch + +* Sat Jan 9 2016 Jan Kratochvil - 7.10.50.20160106-36.fc24 +- VLA (Fortran dynamic arrays) strides (multi-dimensional subarrays) from Intel. + +* Fri Jan 8 2016 Jan Kratochvil - 7.10.50.20160106-35.fc24 +- Fix false FAILs on too long base directory. + +* Fri Jan 8 2016 Jan Kratochvil - 7.10.50.20160106-34.fc24 +- Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot). + +* Sat Nov 14 2015 Jan Kratochvil - 7.10.50.20151113-33.fc24 +- Rebase to FSF GDB 7.10.50.20151113 (trunk snapshot). +- [testsuite] BuildRequire libmpx for --with testsuite. +- Force libncursesw over libncurses to match the includes (RH BZ 1270534). + +* Thu Nov 12 2015 Fedora Release Engineering - 7.10.50.20151027-32.fc24 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Sun Nov 8 2015 Jan Kratochvil - 7.10.50.20151027-31.fc24 +- [aarch64] Fix build regression (RH BZ 1278902, bugreport by Peter Robinson). + +* Tue Nov 3 2015 Jan Kratochvil - 7.10.50.20151027-30.fc24 +- Rebase to FSF GDB 7.10.50.20151027 (trunk snapshot). + +* Mon Oct 12 2015 Jan Kratochvil - 7.10-29.fc23 +- Fix internal error on DW_OP_bregx(-1) (RH BZ 1270564). + +* Mon Sep 28 2015 Jan Kratochvil - 7.10-28.fc23 +- Add --with buildisa, remove %%{?_isa} from BuildRequires by default: + https://github.com/msimacek/koschei/issues/54 + +* Thu Sep 24 2015 Jan Kratochvil - 7.10-27.fc23 +- [rhel6,rhel7] Keep pahole.py and make it Python2 compatible. + +* Wed Sep 23 2015 Jan Kratochvil - 7.10-26.fc23 - [rhel7] Provide libstdc++-v3-python with C++11 even on RHEL-7 (RH BZ 1239290). - Do not provide libstdc++-v3-python lib64 files on 32-bit archs. - [rhel6,rhel7] Delete pahole.py on Python2 systems. -* Mon Sep 14 2015 Jan Kratochvil - 7.10-17.el7 +* Wed Sep 23 2015 Robert Kuska - 7.10-25.fc23 +- Python3.5 Rebuild: Rebuild wit python3 support + +* Wed Sep 23 2015 Robert Kuska - 7.10-24.fc23 +- Python3.5 Rebuild: Rebuild without python3 support + +* Fri Sep 18 2015 Jan Kratochvil - 7.10-23.fc23 +- Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). + +* Sun Sep 13 2015 Jan Kratochvil - 7.10-22.fc23 - Fix gstack to use gdb from $PATH (bugreport by Frank Hirtz, RH BZ 1262589). +* Fri Sep 11 2015 Jan Kratochvil - 7.10-21.fc23 +- [testsuite] Fix gcc-gdb-plugin and gcc-go BuildRequires for --with testsuite. + +* Thu Sep 10 2015 Jan Kratochvil - 7.10-20.fc23 +- [ppc64le] Use skip_entrypoint for skip_trampoline_code (RH BZ 1260558). + +* Thu Sep 10 2015 Jan Kratochvil - 7.10-19.fc23 +- Add changelog entry and fix librpm dependency broken by Peter Robinson. + +* Thu Sep 3 2015 Jan Kratochvil - 7.10-18.fc23 +- Enable libipt (Intel Processor Trace Decoder Library). + +* Wed Sep 2 2015 Sergio Durigan Junior - 7.10-17.fc23 +- Fix 'Make the probes-based dynamic linker interface more robust to + errors' (Sergio Durigan Junior, RH BZ 1259132). + * Tue Sep 1 2015 Jan Kratochvil - 7.10-16.fc23 - [RHEL] Fix librpm Recommends compatibility.