public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Add missing testcases present in rhel6 GDB; some still FAIL.
Date: Sat, 27 Jun 2026 23:57:57 GMT	[thread overview]
Message-ID: <178260467738.1.10256792499979949654.rpms-gdb-29d49d94919c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 29d49d94919c0664cf9421b12eacbd9e78a7d3f9
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2016-10-20T22:30:43+02:00
Stats  : +2899/-87 in 11 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/29d49d94919c0664cf9421b12eacbd9e78a7d3f9?branch=gdb-17.2-rebase-f44

Log:
Add missing testcases present in rhel6 GDB; some still FAIL.

---
diff --git a/gdb-6.3-step-thread-exit-20050211-test.patch b/gdb-6.3-step-thread-exit-20050211-test.patch
new file mode 100644
index 0000000..69a2f96
--- /dev/null
+++ b/gdb-6.3-step-thread-exit-20050211-test.patch
@@ -0,0 +1,187 @@
+2005-02-11  Jeff Johnston  <jjohnstn@redhat.com>
+
+	* testsuite/gdb.threads/step-thread-exit.c: New testcase.
+	* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
+	
+Index: gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.c	2016-10-20 21:36:17.288651989 +0200
+@@ -0,0 +1,49 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2005 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.  */
++
++#include <pthread.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++
++void *thread_function (void *ptr)
++{
++  int *x = (int *)ptr;
++  printf("In thread_function, *x is %d\n", *x);
++} /* thread_function_end */
++
++volatile int repeat = 0;
++
++int
++main (void)
++{
++  int ret;
++  pthread_t th;
++  int i = 3;
++
++  ret = pthread_create (&th, NULL, thread_function, &i);
++  do
++    {
++      repeat = 0;
++      sleep (3);  /* sleep */
++    }
++  while (repeat);
++  pthread_join (th, NULL);
++  return 0;
++}
+Index: gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.exp	2016-10-20 21:38:17.672579153 +0200
+@@ -0,0 +1,123 @@
++# This testcase is part of GDB, the GNU debugger.
++
++# Copyright 2005 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.  
++
++# Check that GDB can step over a thread exit.
++
++set testfile "step-thread-exit"
++set srcfile ${testfile}.c
++set binfile [standard_output_file ${testfile}]
++if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=[standard_output_file .]"]] != "" } {
++    return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++# Reset the debug file directory so we can't debug within the C library
++gdb_test "set debug-file-directory ." "" ""
++
++#
++# Run to `main' where we begin our tests.
++#
++
++if ![runto_main] then {
++    gdb_suppress_tests
++}
++
++# FIXME: Currently the main thread will escape/exit before our thread finishes
++# without this setting.
++gdb_test "set scheduler-locking step"
++gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
++
++set sleep_line [expr [gdb_get_line_number "sleep"]]
++set end_line [expr [gdb_get_line_number "thread_function_end"]]
++
++gdb_breakpoint "$end_line"
++gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
++
++# Keep nexting until we cause the thread to exit.  We expect the main
++# thread to be stopped and a message printed to tell us we have stepped
++# over the thread exit.
++set test "step over thread exit 1"
++gdb_test_multiple "next" "$test" {
++  -re "\}.*$gdb_prompt $" {
++     send_gdb "next\n"
++     exp_continue
++  }
++  -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
++     pass "$test"
++  }
++  -re "start_thread.*$gdb_prompt $" {
++     send_gdb "next\n"
++     exp_continue
++  }
++}
++
++# Without this fixup we could end up in:
++# #0  0x00110416 in __kernel_vsyscall ()
++# #1  0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
++# #2  0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
++# #3  0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
++# #4  0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
++gdb_breakpoint "$sleep_line"
++gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
++gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
++
++gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
++
++runto_main
++gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
++
++gdb_breakpoint "$sleep_line"
++gdb_breakpoint "$end_line"
++set test "continue to thread_function 2"
++gdb_test_multiple "continue" "$test" {
++    -re "Break.*thread_function.*$gdb_prompt $" {
++	pass $test
++    }
++    -re "Break.*$sleep_line.*$gdb_prompt $" {
++	gdb_test "set repeat=1" "" ""
++	send_gdb "continue\n"
++	exp_continue
++    }
++}
++
++# Keep nexting until we cause the thread to exit.  In this case, we
++# expect the breakpoint in the main thread to have already triggered
++# and so we should stop there with a message that we stepped over
++# the thread exit.
++set test "step over thread exit 2"
++gdb_test_multiple "next" "$test" {
++  -re "\}.*$gdb_prompt $" {
++     send_gdb "next\n"
++     exp_continue
++  }
++  -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
++     pass "$test (breakpoint hit)"
++  }
++  -re "\[Thread .* exited\].*$gdb_prompt $" {
++     pass "$test (breakpoint not hit)"
++  }
++  -re "start_thread.*$gdb_prompt $" {
++     send_gdb "next\n"
++     exp_continue
++  }
++}
++

diff --git a/gdb-archer-vla-tests.patch b/gdb-archer-vla-tests.patch
index f30180a..1332614 100644
--- a/gdb-archer-vla-tests.patch
+++ b/gdb-archer-vla-tests.patch
@@ -1,7 +1,7 @@
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.ada/packed_array.exp
+Index: gdb-7.12/gdb/testsuite/gdb.ada/packed_array.exp
 ===================================================================
---- gdb-7.11.90.20160807.orig/gdb/testsuite/gdb.ada/packed_array.exp	2016-08-07 04:00:01.000000000 +0200
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.ada/packed_array.exp	2016-08-25 18:44:42.058789058 +0200
+--- gdb-7.12.orig/gdb/testsuite/gdb.ada/packed_array.exp	2016-10-20 21:02:30.941970556 +0200
++++ gdb-7.12/gdb/testsuite/gdb.ada/packed_array.exp	2016-10-20 21:03:09.484271913 +0200
 @@ -56,5 +56,11 @@
          # are.  Observed with (FSF GNU Ada 4.5.3 20110124).
          xfail $test
@@ -14,10 +14,593 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.ada/packed_array.exp
 +    }
  }
  
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
+Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S	2016-08-25 18:44:42.058789058 +0200
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S	2016-10-20 21:03:09.485271921 +0200
+@@ -0,0 +1,457 @@
++	.file	"x86_64-vla-pointer.c"
++	.section	.debug_abbrev,"",@progbits
++.Ldebug_abbrev0:
++	.section	.debug_info,"",@progbits
++.Ldebug_info0:
++	.section	.debug_line,"",@progbits
++.Ldebug_line0:
++	.text
++.Ltext0:
++.globl foo
++	.type	foo, @function
++foo:
++.LFB2:
++	.file 1 "x86_64-vla-pointer.c"
++	.loc 1 22 0
++	pushq	%rbp
++.LCFI0:
++	movq	%rsp, %rbp
++.LCFI1:
++	subq	$64, %rsp
++.LCFI2:
++	movl	%edi, -36(%rbp)
++	.loc 1 22 0
++	movq	%rsp, %rax
++	movq	%rax, -48(%rbp)
++	.loc 1 23 0
++	movl	-36(%rbp), %edx
++	movslq	%edx,%rax
++	subq	$1, %rax
++	movq	%rax, -24(%rbp)
++	.loc 1 24 0
++	movslq	%edx,%rax
++	addq	$15, %rax
++	addq	$15, %rax
++	shrq	$4, %rax
++	salq	$4, %rax
++	subq	%rax, %rsp
++	movq	%rsp, -56(%rbp)
++	movq	-56(%rbp), %rax
++	addq	$15, %rax
++	shrq	$4, %rax
++	salq	$4, %rax
++	movq	%rax, -56(%rbp)
++	movq	-56(%rbp), %rax
++	movq	%rax, -16(%rbp)
++	.loc 1 27 0
++	movl	$0, -4(%rbp)
++	jmp	.L2
++.L3:
++	.loc 1 28 0
++	movl	-4(%rbp), %esi
++	movl	-4(%rbp), %eax
++	movl	%eax, %ecx
++	movq	-16(%rbp), %rdx
++	movslq	%esi,%rax
++	movb	%cl, (%rdx,%rax)
++	.loc 1 27 0
++	addl	$1, -4(%rbp)
++.L2:
++	movl	-4(%rbp), %eax
++	cmpl	-36(%rbp), %eax
++	jl	.L3
++	.loc 1 30 0
++	.globl	break_here
++break_here:
++	movq	-16(%rbp), %rax
++	movb	$0, (%rax)
++	movq	-48(%rbp), %rsp
++	.loc 1 31 0
++	leave
++	ret
++.LFE2:
++	.size	foo, .-foo
++	.section	.debug_frame,"",@progbits
++.Lframe0:
++	.long	.LECIE0-.LSCIE0
++.LSCIE0:
++	.long	0xffffffff
++	.byte	0x1
++	.string	""
++	.uleb128 0x1
++	.sleb128 -8
++	.byte	0x10
++	.byte	0xc
++	.uleb128 0x7
++	.uleb128 0x8
++	.byte	0x90
++	.uleb128 0x1
++	.align 8
++.LECIE0:
++.LSFDE0:
++	.long	.LEFDE0-.LASFDE0
++.LASFDE0:
++	.long	.Lframe0
++	.quad	.LFB2
++	.quad	.LFE2-.LFB2
++	.byte	0x4
++	.long	.LCFI0-.LFB2
++	.byte	0xe
++	.uleb128 0x10
++	.byte	0x86
++	.uleb128 0x2
++	.byte	0x4
++	.long	.LCFI1-.LCFI0
++	.byte	0xd
++	.uleb128 0x6
++	.align 8
++.LEFDE0:
++	.section	.eh_frame,"a",@progbits
++.Lframe1:
++	.long	.LECIE1-.LSCIE1
++.LSCIE1:
++	.long	0x0
++	.byte	0x1
++	.string	"zR"
++	.uleb128 0x1
++	.sleb128 -8
++	.byte	0x10
++	.uleb128 0x1
++	.byte	0x3
++	.byte	0xc
++	.uleb128 0x7
++	.uleb128 0x8
++	.byte	0x90
++	.uleb128 0x1
++	.align 8
++.LECIE1:
++.LSFDE1:
++	.long	.LEFDE1-.LASFDE1
++.LASFDE1:
++	.long	.LASFDE1-.Lframe1
++	.long	.LFB2
++	.long	.LFE2-.LFB2
++	.uleb128 0x0
++	.byte	0x4
++	.long	.LCFI0-.LFB2
++	.byte	0xe
++	.uleb128 0x10
++	.byte	0x86
++	.uleb128 0x2
++	.byte	0x4
++	.long	.LCFI1-.LCFI0
++	.byte	0xd
++	.uleb128 0x6
++	.align 8
++.LEFDE1:
++	.text
++.Letext0:
++	.section	.debug_loc,"",@progbits
++.Ldebug_loc0:
++.LLST0:
++	.quad	.LFB2-.Ltext0
++	.quad	.LCFI0-.Ltext0
++	.value	0x2
++	.byte	0x77
++	.sleb128 8
++	.quad	.LCFI0-.Ltext0
++	.quad	.LCFI1-.Ltext0
++	.value	0x2
++	.byte	0x77
++	.sleb128 16
++	.quad	.LCFI1-.Ltext0
++	.quad	.LFE2-.Ltext0
++	.value	0x2
++	.byte	0x76
++	.sleb128 16
++	.quad	0x0
++	.quad	0x0
++	.section	.debug_info
++.Ldebug_relative:
++	.long	.Ldebug_end - .Ldebug_start
++.Ldebug_start:
++	.value	0x2
++	.long	.Ldebug_abbrev0
++	.byte	0x8
++	.uleb128 0x1
++	.long	.LASF2
++	.byte	0x1
++	.long	.LASF3
++	.long	.LASF4
++	.quad	.Ltext0
++	.quad	.Letext0
++	.long	.Ldebug_line0
++	.uleb128 0x2
++	.byte	0x1
++	.string	"foo"
++	.byte	0x1
++	.byte	0x16
++	.byte	0x1
++	.quad	.LFB2
++	.quad	.LFE2
++	.long	.LLST0
++	.long	.Ltype_int - .Ldebug_relative
++	.uleb128 0x3
++	.long	.LASF5
++	.byte	0x1
++	.byte	0x15
++	.long	.Ltype_int - .Ldebug_relative
++	.byte	0x2
++	.byte	0x91
++	.sleb128 -52
++.Ltag_pointer:
++	.uleb128 0x4
++	.byte	0x8	/* DW_AT_byte_size */
++	.long	.Ltag_array_type - .debug_info	/* DW_AT_type */
++	.uleb128 0x5	/* Abbrev Number: 5 (DW_TAG_variable) */
++	.long	.LASF0
++	.byte	0x1
++	.byte	0x18
++#if 1
++	.long	.Ltag_pointer - .debug_info
++#else
++	/* Debugging only: Skip the typedef indirection.  */
++	.long	.Ltag_array_type - .debug_info
++#endif
++	/* DW_AT_location: DW_FORM_block1: start */
++	.byte	0x3
++	.byte	0x91
++	.sleb128 -32
++#if 0
++	.byte	0x6	/* DW_OP_deref */
++#else
++	.byte	0x96	/* DW_OP_nop */
++#endif
++	/* DW_AT_location: DW_FORM_block1: end */
++	.uleb128 0x6
++	.string	"i"
++	.byte	0x1
++	.byte	0x19
++	.long	.Ltype_int - .Ldebug_relative
++	.byte	0x2
++	.byte	0x91
++	.sleb128 -20
++	.byte	0x0
++.Ltype_int:
++	.uleb128 0x7
++	.byte	0x4
++	.byte	0x5
++	.string	"int"
++.Ltag_array_type:
++	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
++	.long	.Ltype_char - .Ldebug_relative
++	.long	.Ltype_ulong - .Ldebug_relative	/* DW_AT_sibling: DW_FORM_ref4 */
++1:	/* DW_AT_data_location: DW_FORM_block1: start */
++	.byte	2f - 3f	/* length */
++3:
++	.byte	0x97	/* DW_OP_push_object_address */
++#if 1
++	.byte	0x6	/* DW_OP_deref */
++#else
++	.byte	0x96	/* DW_OP_nop */
++#endif
++2:	/* DW_AT_data_location: DW_FORM_block1: end */
++	.uleb128 0x9
++	.long	.Ltype_char - .Ldebug_relative	/* DW_AT_type: DW_FORM_ref4 */
++	.byte	0x3
++	.byte	0x91
++	.sleb128 -40
++	.byte	0x6
++	.byte	0x0
++.Ltype_ulong:
++	.uleb128 0xa
++	.byte	0x8
++	.byte	0x7
++.Ltype_char:
++	.uleb128 0xb
++	.byte	0x1
++	.byte	0x6
++	.long	.LASF1
++	.byte	0x0
++.Ldebug_end:
++	.section	.debug_abbrev
++	.uleb128 0x1
++	.uleb128 0x11
++	.byte	0x1
++	.uleb128 0x25
++	.uleb128 0xe
++	.uleb128 0x13
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x1b
++	.uleb128 0xe
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x10
++	.uleb128 0x6
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x2
++	.uleb128 0x2e
++	.byte	0x1
++	.uleb128 0x3f
++	.uleb128 0xc
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x27
++	.uleb128 0xc
++	.uleb128 0x11
++	.uleb128 0x1
++	.uleb128 0x12
++	.uleb128 0x1
++	.uleb128 0x40
++	.uleb128 0x6
++	.uleb128 0x1
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x5
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x4	/* .Ltag_pointer abbrev */
++	.uleb128 0x0f	/* DW_TAG_pointer_type */
++	.byte	0x0
++	.uleb128 0x0b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x5
++	.uleb128 0x34
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0xe
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x6
++	.uleb128 0x34
++	.byte	0x0
++	.uleb128 0x3
++	.uleb128 0x8
++	.uleb128 0x3a
++	.uleb128 0xb
++	.uleb128 0x3b
++	.uleb128 0xb
++	.uleb128 0x49
++	.uleb128 0x13
++	.uleb128 0x2
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x7
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0x8
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x8	/* Abbrev Number: 8 (DW_TAG_array_type) */
++	.uleb128 0x1
++	.byte	0x1
++	.uleb128 0x49	/* DW_AT_type */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x1	/* DW_AT_sibling */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x50	/* DW_AT_data_location */
++	.uleb128 0xa	/* DW_FORM_block1 */
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0x9
++	.uleb128 0x21
++	.byte	0x0
++	.uleb128 0x49	/* DW_AT_type */
++	.uleb128 0x13	/* DW_FORM_ref4 */
++	.uleb128 0x2f
++	.uleb128 0xa
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0xa
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.byte	0x0
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0x24
++	.byte	0x0
++	.uleb128 0xb
++	.uleb128 0xb
++	.uleb128 0x3e
++	.uleb128 0xb
++	.uleb128 0x3
++	.uleb128 0xe
++	.byte	0x0
++	.byte	0x0
++	.byte	0x0
++	.section	.debug_pubnames,"",@progbits
++	.long	0x16
++	.value	0x2
++	.long	.Ldebug_info0
++	.long	0xa8
++	.long	0x2d
++	.string	"foo"
++	.long	0x0
++	.section	.debug_aranges,"",@progbits
++	.long	0x2c
++	.value	0x2
++	.long	.Ldebug_info0
++	.byte	0x8
++	.byte	0x0
++	.value	0x0
++	.value	0x0
++	.quad	.Ltext0
++	.quad	.Letext0-.Ltext0
++	.quad	0x0
++	.quad	0x0
++	.section	.debug_str,"MS",@progbits,1
++.LASF0:
++	.string	"array"
++.LASF5:
++	.string	"size"
++.LASF3:
++	.string	"x86_64-vla-pointer.c"
++.LASF6:
++	.string	"array_t"
++.LASF1:
++	.string	"char"
++.LASF4:
++	.string	"gdb.arch"
++.LASF2:
++	.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.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c	2016-10-20 21:03:09.485271921 +0200
+@@ -0,0 +1,45 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2009 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++#if 0
++
++void
++foo (int size)
++{
++  typedef char array_t[size];
++  array_t array;
++  int i;
++
++  for (i = 0; i < size; i++)
++    array[i] = i;
++
++  array[0] = 0;	/* break-here */
++}
++
++#else
++
++void foo (int size);
++
++int
++main (void)
++{
++  foo (26);
++  foo (78);
++  return 0;
++}
++
++#endif
+Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp	2016-10-20 21:03:09.485271921 +0200
+@@ -0,0 +1,66 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if ![istarget "x86_64-*-*"] then {
++    verbose "Skipping over gdb.arch/x86_64-vla-pointer.exp test made only for x86_64."
++    return
++}
++
++set testfile x86_64-vla-pointer
++set srcasmfile ${testfile}-foo.S
++set srcfile ${testfile}.c
++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
++}
++if  { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${binobjfile}" "${binfile}" executable {debug}] != "" } {
++    untested "Couldn't compile test program"
++    return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++if ![runto_main] {
++    untested x86_64-vla-pointer
++    return -1
++}
++
++gdb_breakpoint "break_here"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "first: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[26\\\]" "first: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[26\\\]" "first: whatis *array"
++gdb_test "ptype *array" "type = char \\\[26\\\]" "first: ptype *array"
++
++gdb_test "p (*array)\[1\]" "\\$\[0-9\] = 1 '\\\\001'"
++gdb_test "p (*array)\[2\]" "\\$\[0-9\] = 2 '\\\\002'"
++gdb_test "p (*array)\[3\]" "\\$\[0-9\] = 3 '\\\\003'"
++gdb_test "p (*array)\[4\]" "\\$\[0-9\] = 4 '\\\\004'"
++
++gdb_continue_to_breakpoint "break_here"
++
++gdb_test "whatis array" "type = char \\(\\*\\)\\\[variable\\\]" "second: whatis array"
++gdb_test "ptype array" "type = char \\(\\*\\)\\\[78\\\]" "second: ptype array"
++
++gdb_test "whatis *array" "type = char \\\[78\\\]" "second: whatis *array"
++gdb_test "ptype *array" "type = char \\\[78\\\]" "second: ptype *array"
+Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S	2016-10-20 21:03:09.486271929 +0200
 @@ -0,0 +1,455 @@
 +	.file	"x86_64-vla-typedef.c"
 +	.section	.debug_abbrev,"",@progbits
@@ -474,10 +1057,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
+Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c	2016-08-25 18:44:42.058789058 +0200
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c	2016-10-20 21:03:09.486271929 +0200
 @@ -0,0 +1,45 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -524,10 +1107,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
 +}
 +
 +#endif
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
+Index: gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp	2016-08-25 18:44:42.058789058 +0200
++++ gdb-7.12/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp	2016-10-20 21:03:09.486271929 +0200
 @@ -0,0 +1,64 @@
 +# Copyright 2009 Free Software Foundation, Inc.
 +
@@ -593,10 +1176,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.c
+Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.c
 ===================================================================
---- gdb-7.11.90.20160807.orig/gdb/testsuite/gdb.base/arrayidx.c	2016-08-07 04:00:01.000000000 +0200
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.c	2016-08-25 18:44:42.058789058 +0200
+--- gdb-7.12.orig/gdb/testsuite/gdb.base/arrayidx.c	2016-10-20 21:02:30.941970556 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/arrayidx.c	2016-10-20 21:03:09.486271929 +0200
 @@ -17,6 +17,13 @@
  
  int array[] = {1, 2, 3, 4};
@@ -611,10 +1194,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.c
  int
  main (void)
  {
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.exp
+Index: gdb-7.12/gdb/testsuite/gdb.base/arrayidx.exp
 ===================================================================
---- gdb-7.11.90.20160807.orig/gdb/testsuite/gdb.base/arrayidx.exp	2016-08-07 04:00:01.000000000 +0200
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.exp	2016-08-25 18:44:42.059789067 +0200
+--- gdb-7.12.orig/gdb/testsuite/gdb.base/arrayidx.exp	2016-10-20 21:02:30.941970556 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/arrayidx.exp	2016-10-20 21:03:09.486271929 +0200
 @@ -49,4 +49,12 @@
           "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
           "Print array with array-indexes on"
@@ -629,10 +1212,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/arrayidx.exp
 +	unsupported "$test (no GCC)"
 +    }
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.c
+Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.c	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.c	2016-10-20 21:03:09.486271929 +0200
 @@ -0,0 +1,20 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -654,10 +1237,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.c
 +struct {
 +  int field;
 +} staticstruct = { 1 };
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.exp
+Index: gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.exp	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/internal-var-field-address.exp	2016-10-20 21:03:09.486271929 +0200
 @@ -0,0 +1,26 @@
 +# Copyright 2009 Free Software Foundation, Inc.
 +
@@ -685,10 +1268,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/internal-var-field-address.ex
 +
 +gdb_test {set $varstruct = staticstruct}
 +gdb_test {p $varstruct.field} " = 1"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.c
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.c	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla-frame.c	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,31 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -721,10 +1304,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.c
 +  f (s);
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.exp
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla-frame.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.exp	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla-frame.exp	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,38 @@
 +# Copyright 2011 Free Software Foundation, Inc.
 +#
@@ -764,10 +1347,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-frame.exp
 +}
 +
 +gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-overflow.c
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-overflow.c	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.c	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,30 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -799,10 +1382,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-overflow.c
 +
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-overflow.exp
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla-overflow.exp	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla-overflow.exp	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,109 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -913,10 +1496,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.base/vla.c
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla.c	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla.c	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,55 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -973,10 +1556,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla.c
 +  foo (78);
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla.exp
+Index: gdb-7.12/gdb/testsuite/gdb.base/vla.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla.exp	2016-08-25 18:44:42.059789067 +0200
++++ gdb-7.12/gdb/testsuite/gdb.base/vla.exp	2016-10-20 21:03:09.487271936 +0200
 @@ -0,0 +1,62 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -1040,10 +1623,382 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/vla.exp
 +gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
 +gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
 +gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
+Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.cc	2016-10-20 21:03:09.487271936 +0200
+@@ -0,0 +1,180 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2008, 2009 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++   */
++#include <iostream>
++
++using namespace std;
++
++class NextOverThrowDerivates
++{
++
++public:
++
++
++  // Single throw an exception in this function.
++  void function1() 
++  {
++    throw 20;
++  }
++
++  // Throw an exception in another function.
++  void function2() 
++  {
++    function1();
++  }
++
++  // Throw an exception in another function, but handle it
++  // locally.
++  void function3 () 
++  {
++    {
++      try
++	{
++	  function1 ();
++	}
++      catch (...) 
++	{
++	  cout << "Caught and handled function1 exception" << endl;
++	}
++    }
++  }
++
++  void rethrow ()
++  {
++    try
++      {
++	function1 ();
++      }
++    catch (...)
++      {
++	throw;
++      }
++  }
++
++  void finish ()
++  {
++    // We use this to test that a "finish" here does not end up in
++    // this frame, but in the one above.
++    try
++      {
++	function1 ();
++      }
++    catch (int x)
++      {
++      }
++    function1 ();		// marker for until
++  }
++
++  void until ()
++  {
++    function1 ();
++    function1 ();		// until here
++  }
++
++};
++NextOverThrowDerivates next_cases;
++
++
++int main () 
++{ 
++  try
++    {
++      next_cases.function1 ();
++    }
++  catch (...)
++    {
++      // Discard
++    }
++
++  try
++    {
++      next_cases.function2 ();
++    }
++  catch (...)
++    {
++      // Discard
++    }
++
++  try
++    {
++      // This is duplicated so we can next over one but step into
++      // another.
++      next_cases.function2 ();
++    }
++  catch (...)
++    {
++      // Discard
++    }
++
++  next_cases.function3 ();
++
++  try
++    {
++      next_cases.rethrow ();
++    }
++  catch (...)
++    {
++      // Discard
++    }
++
++  try
++    {
++      // Another duplicate so we can test "finish".
++      next_cases.function2 ();
++    }
++  catch (...)
++    {
++      // Discard
++    }
++
++  // Another test for "finish".
++  try
++    {
++      next_cases.finish ();
++    }
++  catch (...)
++    {
++    }
++
++  // Test of "until".
++  try
++    {
++      next_cases.finish ();
++    }
++  catch (...)
++    {
++    }
++
++  // Test of "until" with an argument.
++  try
++    {
++      next_cases.until ();
++    }
++  catch (...)
++    {
++    }
++
++  // Test of "advance".
++  try
++    {
++      next_cases.until ();
++    }
++  catch (...)
++    {
++    }
++}
++
+Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.cp/gdb9593.exp	2016-10-20 21:10:48.128848142 +0200
+@@ -0,0 +1,182 @@
++# Copyright 2008, 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++
++if $tracelevel then {
++    strace $tracelevel
++}
++
++if { [skip_cplus_tests] } { continue }
++
++set testfile "gdb9593"
++set srcfile ${testfile}.cc
++set binfile [standard_output_file $testfile]
++
++# Create and source the file that provides information about the compiler
++# used to compile the test case.
++if [get_compiler_info "c++"] {
++    untested gdb9593.exp
++    return -1
++}
++
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
++    untested gdb9593.exp
++    return -1
++}
++
++# Some targets can't do function calls, so don't even bother with this
++# test.
++if [target_info exists gdb,cannot_call_functions] {
++    setup_xfail "*-*-*" 9593
++    fail "This target can not call functions"
++    continue
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++if ![runto_main] then {
++    perror "couldn't run to main"
++    continue
++} 
++
++# See whether we have the needed unwinder hooks.
++set ok 1
++gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" {
++    -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" {
++	pass "check for unwinder hook"
++    }
++    -re "No symbol .* in current context.\r\n$gdb_prompt $" {
++	# Pass the test so we don't get bogus fails in the results.
++	pass "check for unwinder hook"
++	set ok 0
++    }
++}
++if {!$ok} {
++    untested gdb9593.exp
++    return -1
++}
++
++# See http://sourceware.org/bugzilla/show_bug.cgi?id=9593
++
++gdb_test "next" \
++    ".*catch (...).*" \
++    "next over a throw 1"
++
++gdb_test "next" \
++  ".*next_cases.function2.*" \
++  "next past catch 1"
++
++gdb_test "next" \
++    ".*catch (...).*" \
++    "next over a throw 2"
++
++gdb_test "next" \
++  ".*next_cases.function2.*" \
++  "next past catch 2"
++
++gdb_test "step" \
++  ".*function1().*" \
++  "step into function2 1"
++
++gdb_test "next" \
++    ".*catch (...).*" \
++    "next over a throw 3"
++
++gdb_test "next" \
++  ".*next_cases.function3.*" \
++  "next past catch 3"
++
++gdb_test "next" \
++  ".*next_cases.rethrow.*" \
++    "next over a throw 4"
++
++gdb_test "next" \
++  ".*catch (...).*" \
++  "next over a rethrow"
++
++gdb_test "next" \
++  ".*next_cases.function2.*" \
++  "next after a rethrow"
++
++gdb_test "step" \
++  ".*function1().*" \
++  "step into function2 2"
++
++gdb_test "finish" \
++  ".*catch (...).*" \
++  "finish 1"
++
++gdb_test "next" \
++  ".*next_cases.finish ().*" \
++  "next past catch 4"
++
++gdb_test "step" \
++  ".*function1 ().*" \
++  "step into finish method"
++
++gdb_test "finish" \
++  ".*catch (...).*" \
++  "finish 2"
++
++gdb_test "next" \
++  ".*next_cases.finish ().*" \
++  "next past catch 5"
++
++gdb_test "step" \
++  ".*function1 ().*" \
++  "step into finish, for until"
++
++gdb_test "until" \
++  ".*function1 ().*" \
++  "until with no argument 1"
++
++set line [gdb_get_line_number "marker for until" $testfile.cc]
++
++gdb_test "until $line" \
++  ".*function1 ().*" \
++  "next past catch 6"
++
++gdb_test "until" \
++  ".*catch (...).*" \
++  "until with no argument 2"
++
++set line [gdb_get_line_number "until here" $testfile.cc]
++
++gdb_test "next" \
++  ".*next_cases.until ().*" \
++  "next past catch 6"
++
++gdb_test "step" \
++  ".*function1 ().*" \
++  "step into until"
++
++gdb_test "until $line" \
++  ".*catch (...).*" \
++  "until-over-throw"
++
++gdb_test "next" \
++  ".*next_cases.until ().*" \
++  "next past catch 7"
++
++gdb_test "step" \
++  ".*function1 ().*" \
++  "step into until, for advance"
++
++gdb_test "advance $line" \
++  ".*catch (...).*" \
++  "advance-over-throw"
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S	2016-10-20 21:03:09.488271944 +0200
 @@ -0,0 +1,246 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -1291,10 +2246,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
 +	.string		"char"
 +.Luint_str:
 +	.string		"unsigned int"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp	2016-10-20 21:03:09.488271944 +0200
 @@ -0,0 +1,66 @@
 +# Copyright 2010 Free Software Foundation, Inc.
 +
@@ -1362,10 +2317,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.c	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.c	2016-10-20 21:03:09.488271944 +0200
 @@ -0,0 +1,42 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -1409,10 +2364,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
 +  func1 (1, 2);
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,79 @@
 +# Copyright 2006 Free Software Foundation, Inc.
 +
@@ -1493,10 +2448,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
 +gdb_test "step" \
 +         "func.* \\(.*\\) at .*" \
 +         "step"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,83 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -1581,10 +2536,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
 +
 +	.byte		0x0			/* Terminator */
 +	.byte		0x0			/* Terminator */
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,37 @@
 +# Copyright 2009 Free Software Foundation, Inc.
 +
@@ -1623,10 +2578,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-loca
 +clean_restart $binfile
 +
 +gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,121 @@
 +/* This testcase is part of GDB, the GNU debugger.
 +
@@ -1749,10 +2704,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
 +	.byte		0x0			/* Terminator */
 +
 +	.byte		0x0			/* Terminator */
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
+Index: gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp	2016-08-25 18:44:42.060789076 +0200
++++ gdb-7.12/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,39 @@
 +# Copyright 2012 Free Software Foundation, Inc.
 +
@@ -1793,10 +2748,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
 +
 +gdb_test "ptype notype_string" {type = char \[129\]}
 +gdb_test "p notype_string" " = 'x' <repeats 129 times>"
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dwarf-stride.exp
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dwarf-stride.exp	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.exp	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,42 @@
 +# Copyright 2009 Free Software Foundation, Inc.
 +
@@ -1840,10 +2795,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.fortran/dwarf-stride.f90
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.f90
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dwarf-stride.f90	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/dwarf-stride.f90	2016-10-20 21:03:09.489271952 +0200
 @@ -0,0 +1,40 @@
 +! Copyright 2009 Free Software Foundation, Inc.
 +!
@@ -1885,10 +2840,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dwarf-stride.f90
 +  print *, c40pt  ! break-here
 +
 +end program repro
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dynamic.exp
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dynamic.exp	2016-08-25 18:54:25.957258024 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.exp	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,154 @@
 +# Copyright 2007 Free Software Foundation, Inc.
 +
@@ -2044,10 +2999,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.fortran/dynamic.f90
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.f90
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/dynamic.f90	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/dynamic.f90	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,98 @@
 +! Copyright 2007 Free Software Foundation, Inc.
 +!
@@ -2147,10 +3102,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.fortran/string.exp
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/string.exp	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/string.exp	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,59 @@
 +# Copyright 2008 Free Software Foundation, Inc.
 +
@@ -2211,10 +3166,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.fortran/string.f90
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/string.f90
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/string.f90	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/string.f90	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,37 @@
 +! Copyright 2008 Free Software Foundation, Inc.
 +!
@@ -2253,10 +3208,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/string.f90
 +  h = 'h'
 +  call foo (g, h)
 +end
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.exp
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.exp	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/subrange.exp	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,72 @@
 +# Copyright 2011 Free Software Foundation, Inc.
 +
@@ -2330,10 +3285,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.exp
 +gdb_unload
 +setup_kfail "*-*-*" "vlaregression/9999"
 +gdb_test {p $a (3, 2:2)} { = \(23\)}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.f90
+Index: gdb-7.12/gdb/testsuite/gdb.fortran/subrange.f90
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.f90	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.fortran/subrange.f90	2016-10-20 21:03:09.490271960 +0200
 @@ -0,0 +1,28 @@
 +! Copyright 2011 Free Software Foundation, Inc.
 +!
@@ -2363,10 +3318,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.fortran/subrange.f90
 +  ptr => a
 +  write (*,*) a                 ! break-static
 +end
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
+Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.mi/mi2-var-stale-type.c	2016-08-25 18:44:42.061789086 +0200
++++ gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.c	2016-10-20 21:03:09.491271967 +0200
 @@ -0,0 +1,26 @@
 +/* Copyright 2011 Free Software Foundation, Inc.
 +
@@ -2394,10 +3349,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
 +
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
+Index: gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp	2016-10-20 21:03:09.491271967 +0200
 @@ -0,0 +1,57 @@
 +# Copyright 2011 Free Software Foundation, Inc.
 +#
@@ -2456,10 +3411,10 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register-func.c
+Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register-func.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register-func.c	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register-func.c	2016-10-20 21:03:09.491271967 +0200
 @@ -0,0 +1,22 @@
 +/* This file is part of GDB, the GNU debugger.
 +
@@ -2483,10 +3438,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register-func.c
 +{
 +  return arr[0];
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register.c
+Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register.c	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.c	2016-10-20 21:03:09.491271967 +0200
 @@ -0,0 +1,28 @@
 +/* This file is part of GDB, the GNU debugger.
 +
@@ -2516,10 +3471,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register.c
 +
 +  return 0;
 +}
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register.exp
+Index: gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.opt/array-from-register.exp	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.opt/array-from-register.exp	2016-10-20 21:03:09.491271967 +0200
 @@ -0,0 +1,33 @@
 +# Copyright 2009 Free Software Foundation, Inc.
 +#
@@ -2554,10 +3509,87 @@ Index: gdb-7.11.90.20160807/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.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.exp
+Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.exp	2016-10-20 21:03:09.491271967 +0200
+@@ -0,0 +1,39 @@
++# Copyright 2009 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++# 
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++# 
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
++
++# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
++
++# Test GDB can cope with Fortran strings having their length present in a CPU
++# register.  With -O0 the string length is passed on the stack.  To make this
++# test meaningful the follow assertion should pass.  It is not being checked
++# here as the "_s" symbol is compiler dependent:
++#   (gdb) info address _s
++#   Symbol "_s" is a variable in register XX.
++
++set test fortran-string
++set srcfile ${test}.f90
++if { [prepare_for_testing ${test}.exp ${test} ${srcfile} {debug f90 additional_flags=-O2}] } {
++    return -1
++}
++
++if ![runto $srcfile:[gdb_get_line_number "s = s"]] then {
++    perror "couldn't run to breakpoint MAIN__"
++    continue
++}
++
++gdb_test "frame" ".*s='foo'.*"
++gdb_test "ptype s" "type = character\\*3"
++gdb_test "p s" "\\$\[0-9\]* = 'foo'"
+Index: gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.f90
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.opt/fortran-string.f90	2016-10-20 21:03:09.491271967 +0200
+@@ -0,0 +1,28 @@
++! Copyright 2009 Free Software Foundation, Inc.
++!
++! This program is free software; you can redistribute it and/or modify
++! it under the terms of the GNU General Public License as published by
++! the Free Software Foundation; either version 2 of the License, or
++! (at your option) any later version.
++!
++! This program is distributed in the hope that it will be useful,
++! but WITHOUT ANY WARRANTY; without even the implied warranty of
++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++! GNU General Public License for more details.
++!
++! You should have received a copy of the GNU General Public License
++! along with this program; if not, write to the Free Software
++! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++!
++! Ihis file is the Fortran source file for dynamic.exp.
++! Original file written by Jakub Jelinek <jakub@redhat.com>.
++! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
++
++  subroutine f(s)
++  character*(*) s
++  s = s
++  end
++
++  program main
++  call f ('foo')
++  end
+Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.exp
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.exp	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.pascal/arrays.exp	2016-10-20 21:03:09.492271975 +0200
 @@ -0,0 +1,104 @@
 +# Copyright 2008, 2009 Free Software Foundation, Inc.
 +#
@@ -2663,10 +3695,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.exp
 +}
 +gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char"
 +
-Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.pas
+Index: gdb-7.12/gdb/testsuite/gdb.pascal/arrays.pas
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.pas	2016-08-25 18:44:42.062789095 +0200
++++ gdb-7.12/gdb/testsuite/gdb.pascal/arrays.pas	2016-10-20 21:03:09.492271975 +0200
 @@ -0,0 +1,82 @@
 +{
 + Copyright 2008, 2009 Free Software Foundation, Inc.
@@ -2750,10 +3782,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.pascal/arrays.pas
 +  s := 'test'#0'string';
 +  writeln(s); { set breakpoint 2 here }
 +end.
-Index: gdb-7.11.90.20160807/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.12/gdb/testsuite/lib/gdb.exp
 ===================================================================
---- gdb-7.11.90.20160807.orig/gdb/testsuite/lib/gdb.exp	2016-08-25 18:44:41.424783148 +0200
-+++ gdb-7.11.90.20160807/gdb/testsuite/lib/gdb.exp	2016-08-25 18:44:42.063789104 +0200
+--- gdb-7.12.orig/gdb/testsuite/lib/gdb.exp	2016-10-20 21:02:30.941970556 +0200
++++ gdb-7.12/gdb/testsuite/lib/gdb.exp	2016-10-20 21:03:09.493271983 +0200
 @@ -173,6 +173,11 @@
  	    send_gdb "y\n"
  	    exp_continue
@@ -2766,10 +3798,10 @@ Index: gdb-7.11.90.20160807/gdb/testsuite/lib/gdb.exp
  	-re "Discard symbol table from .*y or n.*$" {
  	    send_gdb "y\n"
  	    exp_continue
-Index: gdb-7.11.90.20160807/gdb/testsuite/lib/pascal.exp
+Index: gdb-7.12/gdb/testsuite/lib/pascal.exp
 ===================================================================
---- gdb-7.11.90.20160807.orig/gdb/testsuite/lib/pascal.exp	2016-08-07 04:00:01.000000000 +0200
-+++ gdb-7.11.90.20160807/gdb/testsuite/lib/pascal.exp	2016-08-25 18:44:42.063789104 +0200
+--- gdb-7.12.orig/gdb/testsuite/lib/pascal.exp	2016-10-20 21:02:30.941970556 +0200
++++ gdb-7.12/gdb/testsuite/lib/pascal.exp	2016-10-20 21:03:09.493271983 +0200
 @@ -37,6 +37,9 @@
      global pascal_compiler_is_fpc
      global gpc_compiler

diff --git a/gdb-physname-pr11734-test.patch b/gdb-physname-pr11734-test.patch
new file mode 100644
index 0000000..739ba4a
--- /dev/null
+++ b/gdb-physname-pr11734-test.patch
@@ -0,0 +1,226 @@
+http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
+
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,30 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   Please email any bugs, comments, and/or additions to this file to:
++   bug-gdb@gnu.org  */
++
++#include "pr11734.h"
++
++int
++main ()
++{
++  pr11734 *p = new pr11734;
++  p->foo ();
++  return 0;
++}
++
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,27 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   Please email any bugs, comments, and/or additions to this file to:
++   bug-gdb@gnu.org  */
++
++#include "pr11734.h"
++
++void
++pr11734::foo(void)
++{
++}
++
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,27 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   Please email any bugs, comments, and/or additions to this file to:
++   bug-gdb@gnu.org  */
++
++#include "pr11734.h"
++
++void
++pr11734::foo (int a)
++{
++}
++
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,27 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   Please email any bugs, comments, and/or additions to this file to:
++   bug-gdb@gnu.org  */
++
++#include "pr11734.h"
++
++void
++pr11734::foo (char *a)
++{
++}
++
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,55 @@
++# Copyright 2010 Free Software Foundation, Inc.
++#
++# Contributed by Red Hat, originally written by Keith Seitz.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++# This file is part of the gdb testsuite.
++
++if { [skip_cplus_tests] } { continue }
++
++set testfile "pr11734"
++set class $testfile
++
++set srcfiles {}
++for {set i 1} {$i < 5} {incr i} {
++    lappend srcfiles $testfile-$i.cc
++}
++
++prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
++
++if {![runto_main]} {
++    perror "couldn't run to breakpoint"
++    continue
++}
++
++# An array holding the overload types for the method pr11734::foo.  The
++# first element is the overloaded method parameter.  The second element
++# is the expected source file number, e.g. "pr11734-?.cc".
++array set tests {
++    "char*"  4
++    "int"    3
++    ""       2
++}
++
++# Test each overload instance twice: once quoted, once unquoted
++foreach ovld [array names tests] {
++    set method "${class}::foo\($ovld\)"
++    set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
++    gdb_test "break $method" $result
++    gdb_test "break '$method'" $result
++}
++
++gdb_exit
++return 0
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h	2011-02-03 22:28:01.000000000 +0100
+@@ -0,0 +1,28 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   Please email any bugs, comments, and/or additions to this file to:
++   bug-gdb@gnu.org  */
++
++class pr11734
++{
++ public:
++  void foo ();
++  void foo (int);
++  void foo (char *);
++};
++

diff --git a/gdb-physname-pr12273-test.patch b/gdb-physname-pr12273-test.patch
new file mode 100644
index 0000000..e8bed15
--- /dev/null
+++ b/gdb-physname-pr12273-test.patch
@@ -0,0 +1,95 @@
+http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
+
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc	2011-02-03 22:31:01.000000000 +0100
+@@ -0,0 +1,37 @@
++/* This test case is part of GDB, the GNU debugger.
++
++   Copyright 2010 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++template <typename T>
++class GDB
++{
++ public:
++   static int simple (void) { return 0; }
++   static int harder (T a) { return 1; }
++   template <typename X>
++   static X even_harder (T a) { return static_cast<X> (a); }
++   int operator == (GDB const& other)
++   { return 1; }
++};
++
++int main(int argc, char **argv)
++{
++   GDB<int> a, b;
++   if (a == b)
++     return GDB<char>::harder('a') + GDB<int>::harder(3)
++	+ GDB<char>::even_harder<int> ('a');
++   return GDB<int>::simple ();
++}
+Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp	2011-02-03 22:31:01.000000000 +0100
+@@ -0,0 +1,46 @@
++# Copyright 2010 Free Software Foundation, Inc.
++#
++# Contributed by Red Hat, originally written by Keith Seitz.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++# This file is part of the gdb testsuite.
++
++if {[skip_cplus_tests]} { continue }
++
++set testfile "pr12273"
++# Do NOT compile with debug flag.
++prepare_for_testing pr12273 $testfile $testfile.cc {c++}
++
++gdb_test_no_output "set language c++"
++
++# A list of minimal symbol names to check.
++# Note that GDB<char>::even_harder<int>(char) is quoted and includes
++# the return type.  This is necessary because this is the demangled name
++# of the minimal symbol.
++set min_syms [list \
++		  "GDB<int>::operator ==" \
++		  "GDB<int>::operator==(GDB<int> const&)" \
++		  "GDB<char>::harder(char)" \
++		  "GDB<int>::harder(int)" \
++		  {"int GDB<char>::even_harder<int>(char)"} \
++		  "GDB<int>::simple()"]
++
++foreach sym $min_syms {
++    if {[gdb_breakpoint $sym]} {
++	pass "setting breakpoint at $sym"
++    }
++}
++
++gdb_exit

diff --git a/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch b/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
new file mode 100644
index 0000000..295d1dc
--- /dev/null
+++ b/gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
@@ -0,0 +1,162 @@
+Original message by Tom Tromey:
+
+  <https://sourceware.org/ml/gdb-patches/2012-03/msg00955.html>
+  Message-ID: <871uoc1va3.fsf@fleche.redhat.com>
+
+Comment from Sergio Durigan Junior:
+
+  In order to correctly test this patch, I wrote a testcase based on Jan
+  Kratochvil's <gdb/testsuite/gdb.base/gcore-excessive-memory.exp>.  The
+  testcase, which can be seen below, tests GDB in order to see if the
+  amount of memory being leaked is minimal, as requested in the bugzilla.
+  It is hard to define what "minimum" is, so I ran the testcase on all
+  supported RHEL architectures and came up with an average.
+
+commit cc0265cdda9dc7e8665e8bfcf5b4477489daf27c
+Author: Tom Tromey <tromey@redhat.com>
+Date:   Wed Mar 28 17:38:08 2012 +0000
+
+    	* python/py-inferior.c (infpy_read_memory): Remove cleanups and
+    	explicitly free 'buffer' on exit paths.  Decref 'membuf_object'
+    	before returning.
+
+Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
+===================================================================
+--- /dev/null
++++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
+@@ -0,0 +1,27 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   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 <http://www.gnu.org/licenses/>.  */
++
++static struct x
++  {
++    char unsigned u[4096];
++  } x, *px = &x;
++
++int
++main (int argc, char *argv[])
++{
++  return 0;
++}
+Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
+===================================================================
+--- /dev/null
++++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
+@@ -0,0 +1,68 @@
++# 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 <http://www.gnu.org/licenses/>.
++
++set testfile py-gdb-rhbz1007614-memleak-infpy_read_memory
++set srcfile ${testfile}.c
++set binfile ${objdir}/${subdir}/${testfile}
++
++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
++    return -1
++}
++
++if { [skip_python_tests] } { continue }
++
++set pid_of_gdb [exp_pid -i [board_info host fileid]]
++
++proc memory_v_pages_get {} {
++    global pid_of_gdb
++    set fd [open "/proc/$pid_of_gdb/statm"]
++    gets $fd line
++    close $fd
++    # number of pages of virtual memory
++    scan $line "%d" drs
++    return $drs
++}
++
++if { ![runto_main] } {
++    untested $testfile.exp
++    return -1
++}
++
++set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
++
++gdb_test "source ${remote_python_file}" ""
++
++gdb_test "hello-world" ""
++
++set kbytes_before [memory_v_pages_get]
++verbose -log "kbytes_before = $kbytes_before"
++
++gdb_test "hello-world" ""
++
++set kbytes_after [memory_v_pages_get]
++verbose -log "kbytes_after = $kbytes_after"
++
++set kbytes_diff [expr $kbytes_after - $kbytes_before]
++verbose -log "kbytes_diff = $kbytes_diff"
++
++# The value "1000" was calculated by running a few GDB sessions with this
++# testcase, and seeing how much (in average) the memory consumption
++# increased after the "hello-world" command issued above.  The average
++# was around 500 bytes, so I chose 1000 as a high estimate.
++if { $kbytes_diff > 1000 } {
++    fail "there is a memory leak on GDB (RHBZ 1007614)"
++} else {
++    pass "there is not a memory leak on GDB (RHBZ 1007614)"
++}
+Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
+===================================================================
+--- /dev/null
++++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
+@@ -0,0 +1,30 @@
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++class HelloWorld (gdb.Command):
++    """Greet the whole world."""
++
++    def __init__ (self):
++        super (HelloWorld, self).__init__ ("hello-world",
++                                           gdb.COMMAND_OBSCURE)
++
++    def invoke (self, arg, from_tty):
++        px = gdb.parse_and_eval("px")
++        core = gdb.inferiors()[0]
++        for i in range(256 * 1024):
++            chunk = core.read_memory(px, 4096)
++        print "Hello, World!"
++
++HelloWorld ()

diff --git a/gdb-rhbz1149205-catch-syscall-after-fork-test.patch b/gdb-rhbz1149205-catch-syscall-after-fork-test.patch
new file mode 100644
index 0000000..b7169ef
--- /dev/null
+++ b/gdb-rhbz1149205-catch-syscall-after-fork-test.patch
@@ -0,0 +1,114 @@
+URL: <https://sourceware.org/ml/gdb-patches/2013-05/msg00364.html>
+Message-ID: <1368136582.30058.7.camel@soleil>
+
+  From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
+  To: gdb-patches at sourceware dot org
+  Subject: RFA: fix gdb_assert caused by 'catch signal ...' and fork
+  Date: Thu, 09 May 2013 23:56:22 +0200
+
+  The attached patch fixes a gdb_assert caused by the combination of catch
+  signal and fork:
+    break-catch-sig.c:152: internal-error: signal_catchpoint_remove_location: Assertion `signal_catch_counts[iter] > 0' failed.
+
+  The problem is that the signal_catch_counts is decremented by detach_breakpoints.
+  The fix consists in not detaching breakpoint locations of type bp_loc_other.
+  The patch introduces a new test.
+
+Comments by Sergio Durigan Junior:
+
+  I addded a specific testcase for this patch, which tests exactly the
+  issue that the customer is facing.  This patch does not solve the
+  whole problem of catching a syscall and forking (for more details,
+  see <https://sourceware.org/bugzilla/show_bug.cgi?id=13457>,
+  specifically comment #3), but it solves the issue reported by the
+  customer.
+
+  I also removed the original testcase of this patch, because it
+  relied on "catch signal", which is a command that is not implemented
+  in this version of GDB.
+
+commit bd9673a4ded96ea5c108601501c8e59003ea1be6
+Author: Philippe Waroquiers <philippe@sourceware.org>
+Date:   Tue May 21 18:47:05 2013 +0000
+
+    Fix internal error caused by interaction between catch signal and fork
+
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c	2016-10-20 21:03:09.584272695 +0200
+@@ -0,0 +1,11 @@
++#include <stdio.h>
++#include <unistd.h>
++
++int
++main (int argc, char **argv)
++{
++  if (fork () == 0)
++    sleep (1);
++  chdir (".");
++  return 0;
++}
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp	2016-10-20 21:04:13.337771174 +0200
+@@ -0,0 +1,58 @@
++# Copyright 2015 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if { [is_remote target] || ![isnative] } then {
++    continue
++}
++
++set testfile "gdb-rhbz1149205-catch-syscall-fork"
++set srcfile ${testfile}.c
++set binfile [standard_output_file ${testfile}]
++
++# Until "catch syscall" is implemented on other targets...
++if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
++    continue
++}
++
++# This shall be updated whenever 'catch syscall' is implemented
++# on some architecture.
++#if { ![istarget "i\[34567\]86-*-linux*"]
++if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
++     && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
++     && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] } {
++     continue
++}
++
++if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
++    untested ${testfile}.exp
++    return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load $binfile
++
++if { ![runto_main] } {
++    return -1
++}
++
++gdb_test "catch syscall chdir" \
++  "Catchpoint $decimal \\\(syscall (.)?chdir(.)? \\\[$decimal\\\]\\\)" \
++  "catch syscall chdir"
++
++gdb_test "continue" \
++  "Continuing\.\r\n.*\r\nCatchpoint $decimal \\\(call to syscall .?chdir.?.*" \
++  "continue from catch syscall after fork"

diff --git a/gdb-rhbz1156192-recursive-dlopen-test.patch b/gdb-rhbz1156192-recursive-dlopen-test.patch
new file mode 100644
index 0000000..9f7cc6d
--- /dev/null
+++ b/gdb-rhbz1156192-recursive-dlopen-test.patch
@@ -0,0 +1,322 @@
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c	2016-10-20 21:03:09.558272492 +0200
+@@ -0,0 +1,30 @@
++/* Testcase for recursive dlopen calls.
++
++   Copyright (C) 2014 Free Software Foundation, Inc.
++
++   This file is part of GDB.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++/* This test was copied from glibc's testcase called
++   <dlfcn/tst-rec-dlopen.c> and related files.  */
++
++#include <stdio.h>
++#include <stdlib.h>
++
++void
++bar (void)
++{
++  printf ("Called bar.\n");
++}
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c	2016-10-20 21:03:09.558272492 +0200
+@@ -0,0 +1,30 @@
++/* Testcase for recursive dlopen calls.
++
++   Copyright (C) 2014 Free Software Foundation, Inc.
++
++   This file is part of GDB.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++/* This test was copied from glibc's testcase called
++   <dlfcn/tst-rec-dlopen.c> and related files.  */
++
++#include <stdio.h>
++#include <stdlib.h>
++
++void
++foo (void)
++{
++  printf ("Called foo.\n");
++}
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c	2016-10-20 21:03:09.558272492 +0200
+@@ -0,0 +1,124 @@
++/* Testcase for recursive dlopen calls.
++
++   Copyright (C) 2014 Free Software Foundation, Inc.
++
++   This file is part of GDB.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++/* This test was copied from glibc's testcase called
++   <dlfcn/tst-rec-dlopen.c> and related files.  */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <malloc.h>
++#include <dlfcn.h>
++
++#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so"
++#define FUNC "foo"
++
++#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so"
++#define FUNC1 "bar"
++
++/* Prototype for my hook.  */
++void *custom_malloc_hook (size_t, const void *);
++
++/* Pointer to old malloc hooks.  */
++void *(*old_malloc_hook) (size_t, const void *);
++
++/* Call function func_name in DSO dso_name via dlopen.  */
++void
++call_func (const char *dso_name, const char *func_name)
++{
++  int ret;
++  void *dso;
++  void (*func) (void);
++  char *err;
++
++  /* Open the DSO.  */
++  dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL);
++  if (dso == NULL)
++    {
++      err = dlerror ();
++      fprintf (stderr, "%s\n", err);
++      exit (1);
++    }
++  /* Clear any errors.  */
++  dlerror ();
++
++  /* Lookup func.  */
++  *(void **) (&func) = dlsym (dso, func_name);
++  if (func == NULL)
++    {
++      err = dlerror ();
++      if (err != NULL)
++        {
++  fprintf (stderr, "%s\n", err);
++  exit (1);
++        }
++    }
++  /* Call func twice.  */
++  (*func) ();
++
++  /* Close the library and look for errors too.  */
++  ret = dlclose (dso);
++  if (ret != 0)
++    {
++      err = dlerror ();
++      fprintf (stderr, "%s\n", err);
++      exit (1);
++    }
++
++}
++
++/* Empty hook that does nothing.  */
++void *
++custom_malloc_hook (size_t size, const void *caller)
++{
++  void *result;
++  /* Restore old hooks.  */
++  __malloc_hook = old_malloc_hook;
++  /* First call a function in another library via dlopen.  */
++  call_func (DSO1, FUNC1);
++  /* Called recursively.  */
++  result = malloc (size);
++  /* Restore new hooks.  */
++  __malloc_hook = custom_malloc_hook;
++  return result;
++}
++
++int
++main (void)
++{
++
++  /* Save old hook.  */
++  old_malloc_hook = __malloc_hook;
++  /* Install new hook.  */
++  __malloc_hook = custom_malloc_hook;
++
++  /* Attempt to dlopen a shared library. This dlopen will
++     trigger an access to the ld.so.cache, and that in turn
++     will require a malloc to duplicate data in the cache.
++     The malloc will call our malloc hook which calls dlopen
++     recursively, and upon return of this dlopen the non-ref
++     counted ld.so.cache mapping will be unmapped. We will
++     return to the original dlopen and crash trying to access
++     dlopened data.  */
++  call_func (DSO, FUNC);
++
++  /* Restore old hook.  */
++  __malloc_hook = old_malloc_hook;
++
++  return 0;
++}
+Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp	2016-10-20 21:06:01.073613545 +0200
+@@ -0,0 +1,118 @@
++# 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 <http://www.gnu.org/licenses/>.
++
++if { [skip_shlib_tests] } {
++  return 0
++}
++
++# Library foo
++set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo"
++set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c
++set binfile_lib1 [standard_output_file ${libname1}.so]
++# Library bar
++set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar"
++set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c
++set binfile_lib2 [standard_output_file ${libname2}.so]
++
++set testfile "gdb-rhbz1156192-recursive-dlopen"
++set srcfile ${srcdir}/${subdir}/${testfile}.c
++set executable ${testfile}
++set binfile [standard_output_file ${executable}]
++
++if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \
++	{ debug "additional_flags=-fPIC" }] != "" } {
++    untested "Could not compile ${binfile_lib1}"
++    return -1
++}
++
++if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \
++	{ debug "additional_flags=-fPIC" }] != "" } {
++    untested "Could not compile ${binfile_lib2}"
++    return -1
++}
++
++set opts ""
++if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
++	[ list debug shlib_load "additional_flags=-Wno-deprecated-declarations -Wl,${binfile_lib1},-rpath,[file dirname ${binfile_lib1}],${binfile_lib2},-rpath,[file dirname ${binfile_lib2}]" ]] } {
++    untested "Could not compile ${executable}"
++    return -1
++}
++
++proc do_test { has_libfoo has_libbar pass } {
++  global hex binfile_lib2 binfile_lib1 gdb_prompt
++  set libbar_match "[string_to_regexp $binfile_lib2]"
++  set libfoo_match "[string_to_regexp $binfile_lib1]"
++
++  with_test_prefix "pass #$pass" {
++    gdb_test_multiple "info shared" "info shared" {
++      -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
++	if { $has_libfoo && $has_libbar } {
++	  pass "matched libfoo and libbar"
++	} else {
++	  fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
++	}
++      }
++      -re ".*$libfoo_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
++	if { $has_libfoo && !$has_libbar } {
++	  pass "matched libfoo"
++	} else {
++	  fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
++	}
++      }
++      -re ".*$libbar_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
++	if { $has_libbar && !$has_libfoo } {
++	  pass "matched libbar"
++	} else {
++	  fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
++	}
++      }
++      "${gdb_prompt} $" {
++	if { !$has_libfoo && !$has_libbar } {
++	  pass "did not match libfoo nor libbar"
++	} else {
++	  fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
++	}
++      }
++    }
++  }
++}
++
++proc test_stop_on_solib_events { } {
++  set pass 0
++  # This variable holds the information about whether libfoo and
++  # libbar (respectively) are expected in the "info shared" output.
++  set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
++			  { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
++			  { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
++			  { 0 1 } { 0 0 } { 1 0 } { 1 1 } \
++			  { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
++			  { 1 1 } { 1 0 } { 1 0 } { 1 0 } }
++
++  with_test_prefix "stop-on-solib-events" {
++    gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
++
++    gdb_run_cmd
++    foreach l $solib_event_order {
++      incr pass
++      do_test [lindex $l 0] [lindex $l 1] $pass
++      gdb_test "continue" "\(Called \(foo\|bar\)\r\n\)?Stopped due to shared library event"
++    }
++    # In the last pass we do not expect to see libfoo or libbar.
++    incr pass
++    do_test 0 0 $pass
++  }
++}
++
++test_stop_on_solib_events

diff --git a/gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch b/gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
new file mode 100644
index 0000000..ecaece4
--- /dev/null
+++ b/gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
@@ -0,0 +1,125 @@
+Comments from Sergio Durigan Junior:
+
+  The "proper" fix for this whole problem would be to backport the
+  "ambiguous linespec" patch series.  However, it is really not
+  recommended to do that for RHEL GDB, because the patch series is too
+  big and could introduce unwanted regressions.  Instead, what we
+  chose to do was to replace the gdb_assert call by a warning (which
+  allows the user to continue the debugging session), and tell the
+  user that, although more than one location was found for his/her
+  breakpoint, only one will be used.
+
+Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc	2016-10-20 21:06:31.849854180 +0200
+@@ -0,0 +1,22 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2015 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++int
++main (int argc, char *argv[])
++{
++  return 0;
++}
+Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc	2016-10-20 21:06:31.850854188 +0200
+@@ -0,0 +1,26 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2015 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++
++class C
++  {
++    public:
++      C () {}
++      C (int x) {}
++  };
++
++C a;
++C b (1);
+Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp	2016-10-20 21:09:33.408270526 +0200
+@@ -0,0 +1,51 @@
++# Copyright 2015 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if { [skip_cplus_tests] } { continue }
++if { [skip_shlib_tests] } { continue }
++if { [is_remote target] } { continue }
++if { [target_info exists use_gdb_stub] } { continue }
++
++set testfile gdb-rhbz1186476-internal-error-unqualified-name-re-set-main
++set srcfile $testfile.cc
++set executable $testfile
++set binfile [standard_output_file $executable]
++
++set libtestfile gdb-rhbz1186476-internal-error-unqualified-name-re-set
++set libsrcfile $libtestfile.cc
++set sofile [standard_output_file lib$libtestfile.so]
++
++# Create and source the file that provides information about the compiler
++# used to compile the test case.
++if [get_compiler_info "c++"] {
++    return -1
++}
++
++if { [gdb_compile_shlib $srcdir/$subdir/$libsrcfile $sofile {debug c++ "additional_flags=-fPIC"}] != ""
++     || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list additional_flags=-Wl,-rpath,[file dirname ${sofile}] "c++" shlib=${sofile} ]] != ""} {
++    untested $libtestfile.exp
++    return -1
++}
++
++clean_restart $executable
++
++gdb_test_no_output "set breakpoint pending on"
++# gdb_breakpoint would print a failure because of some warning messages
++gdb_test "break C::C" "Breakpoint $decimal \\(C::C\\) pending."
++
++#gdb_test "run" "warning: Found more than one location for breakpoint #$decimal; only the first location will be used.(\r\n)+Breakpoint $decimal, C::C.*"
++gdb_test "run"
++
++gdb_test "info break" " in C::C\\(\\) at .* in C::C\\(int\\) at .*"

diff --git a/gdb-test-ivy-bridge.patch b/gdb-test-ivy-bridge.patch
new file mode 100644
index 0000000..9f574c3
--- /dev/null
+++ b/gdb-test-ivy-bridge.patch
@@ -0,0 +1,461 @@
+Index: gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp	2016-10-20 20:57:31.652630455 +0200
+@@ -0,0 +1,170 @@
++# Copyright 2011 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if {![istarget "x86_64-*-*"]} then {
++    return
++}
++
++set testfile amd64-ivy-bridge
++set test compilation
++if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m64 -nostdlib"]] {
++    fail $test
++    return -1
++}
++pass $test
++
++gdb_test_no_output "set disassembly-flavor att"
++# gas/i386/x86-64-rdrnd.d
++# gas/i386/x86-64-f16c.d
++# gas/i386/x86-64-fsgs.d
++gdb_test "disassemble/r _start" "\r
++Dump of assembler code for function _start:\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand %bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand %ebx\r
++\[^\r\n\]+:\t48 0f c7 f3\t\(             \)?rdrand %rbx\r
++\[^\r\n\]+:\t66 41 0f c7 f0\t\(          \)?rdrand %r8w\r
++\[^\r\n\]+:\t41 0f c7 f0\t\(             \)?rdrand %r8d\r
++\[^\r\n\]+:\t49 0f c7 f0\t\(             \)?rdrand %r8\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand %bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand %ebx\r
++\[^\r\n\]+:\t48 0f c7 f3\t\(             \)?rdrand %rbx\r
++\[^\r\n\]+:\t66 41 0f c7 f0\t\(          \)?rdrand %r8w\r
++\[^\r\n\]+:\t41 0f c7 f0\t\(             \)?rdrand %r8d\r
++\[^\r\n\]+:\t49 0f c7 f0\t\(             \)?rdrand %r8\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps %xmm4,%ymm4\r
++\[^\r\n\]+:\tc4 42 7d 13 00\t\(          \)?vcvtph2ps \\(%r8\\),%ymm8\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps %xmm4,%xmm6\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%rcx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
++\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm8,\\(%r8\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps %xmm4,%ymm4\r
++\[^\r\n\]+:\tc4 42 7d 13 00\t\(          \)?vcvtph2ps \\(%r8\\),%ymm8\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps \\(%rcx\\),%ymm4\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps %xmm4,%xmm6\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%rcx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%rcx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
++\[^\r\n\]+:\tc4 43 79 1d 00 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm8,\\(%r8\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae c3\t\(          \)?rdfsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c0\t\(          \)?rdfsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c0\t\(          \)?rdfsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae cb\t\(          \)?rdgsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c8\t\(          \)?rdgsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c8\t\(          \)?rdgsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae d3\t\(          \)?wrfsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d0\t\(          \)?wrfsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d0\t\(          \)?wrfsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae db\t\(          \)?wrgsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d8\t\(          \)?wrgsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d8\t\(          \)?wrgsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae c3\t\(          \)?rdfsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c0\t\(          \)?rdfsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c0\t\(          \)?rdfsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae cb\t\(          \)?rdgsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c8\t\(          \)?rdgsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c8\t\(          \)?rdgsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae d3\t\(          \)?wrfsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d0\t\(          \)?wrfsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d0\t\(          \)?wrfsbase %r8\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase %ebx\r
++\[^\r\n\]+:\tf3 48 0f ae db\t\(          \)?wrgsbase %rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d8\t\(          \)?wrgsbase %r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d8\t\(          \)?wrgsbase %r8\r
++End of assembler dump\\." "att"
++
++gdb_test_no_output "set disassembly-flavor intel"
++# gas/i386/x86-64-rdrnd-intel.d
++# gas/i386/x86-64-f16c-intel.d
++# gas/i386/x86-64-fsgs-intel.d
++gdb_test "disassemble/r _start" "\r
++Dump of assembler code for function _start:\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand ebx\r
++\[^\r\n\]+:\t48 0f c7 f3\t\(             \)?rdrand rbx\r
++\[^\r\n\]+:\t66 41 0f c7 f0\t\(          \)?rdrand r8w\r
++\[^\r\n\]+:\t41 0f c7 f0\t\(             \)?rdrand r8d\r
++\[^\r\n\]+:\t49 0f c7 f0\t\(             \)?rdrand r8\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand ebx\r
++\[^\r\n\]+:\t48 0f c7 f3\t\(             \)?rdrand rbx\r
++\[^\r\n\]+:\t66 41 0f c7 f0\t\(          \)?rdrand r8w\r
++\[^\r\n\]+:\t41 0f c7 f0\t\(             \)?rdrand r8d\r
++\[^\r\n\]+:\t49 0f c7 f0\t\(             \)?rdrand r8\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps ymm4,xmm4\r
++\[^\r\n\]+:\tc4 42 7d 13 00\t\(          \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps xmm6,xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph xmm4,ymm4,0x2\r
++\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[r8\\\],ymm8,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph xmm4,xmm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps ymm4,xmm4\r
++\[^\r\n\]+:\tc4 42 7d 13 00\t\(          \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps ymm4,XMMWORD PTR \\\[rcx\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps xmm6,xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph xmm4,ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph xmm4,xmm4,0x2\r
++\[^\r\n\]+:\tc4 43 79 1d 00 02\t\(       \)?vcvtps2ph QWORD PTR \\\[r8\\\],xmm8,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae c3\t\(          \)?rdfsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c0\t\(          \)?rdfsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c0\t\(          \)?rdfsbase r8\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae cb\t\(          \)?rdgsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c8\t\(          \)?rdgsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c8\t\(          \)?rdgsbase r8\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae d3\t\(          \)?wrfsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d0\t\(          \)?wrfsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d0\t\(          \)?wrfsbase r8\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae db\t\(          \)?wrgsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d8\t\(          \)?wrgsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d8\t\(          \)?wrgsbase r8\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae c3\t\(          \)?rdfsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c0\t\(          \)?rdfsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c0\t\(          \)?rdfsbase r8\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae cb\t\(          \)?rdgsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae c8\t\(          \)?rdgsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae c8\t\(          \)?rdgsbase r8\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae d3\t\(          \)?wrfsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d0\t\(          \)?wrfsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d0\t\(          \)?wrfsbase r8\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase ebx\r
++\[^\r\n\]+:\tf3 48 0f ae db\t\(          \)?wrgsbase rbx\r
++\[^\r\n\]+:\tf3 41 0f ae d8\t\(          \)?wrgsbase r8d\r
++\[^\r\n\]+:\tf3 49 0f ae d8\t\(          \)?wrgsbase r8\r
++End of assembler dump\\." "intel"
+Index: gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp	2016-10-20 20:57:43.251721147 +0200
+@@ -0,0 +1,106 @@
++# Copyright 2011 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++if {![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]} then {
++    return
++}
++
++set testfile i386-ivy-bridge
++set test compilation
++if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m32 -nostdlib"]] {
++    fail $test
++    return -1
++}
++pass $test
++
++gdb_test_no_output "set disassembly-flavor att"
++# gas/i386/rdrnd.d
++# gas/i386/f16c.d
++# gas/i386/fsgs.d
++gdb_test "disassemble/r _start" "\r
++Dump of assembler code for function _start:\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand %bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand %ebx\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand %bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand %ebx\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps %xmm4,%ymm4\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%ymm4\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps %xmm4,%xmm6\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps %xmm4,%ymm4\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%ymm4\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%ymm4\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps %xmm4,%xmm6\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps \\(%ecx\\),%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase %ebx\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase %ebx\r
++End of assembler dump\\." "att"
++
++gdb_test_no_output "set disassembly-flavor intel"
++# gas/i386/rdrnd-intel.d
++# gas/i386/f16c-intel.d
++# gas/i386/fsgs-intel.d
++gdb_test "disassemble/r _start" "\r
++Dump of assembler code for function _start:\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand ebx\r
++\[^\r\n\]+:\t66 0f c7 f3\t\(             \)?rdrand bx\r
++\[^\r\n\]+:\t0f c7 f3\t\(                \)?rdrand ebx\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps ymm4,xmm4\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps xmm6,xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph xmm4,ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph xmm4,xmm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
++\[^\r\n\]+:\tc4 e2 7d 13 e4\t\(          \)?vcvtph2ps ymm4,xmm4\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e2 7d 13 21\t\(          \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 f4\t\(          \)?vcvtph2ps xmm6,xmm4\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e2 79 13 21\t\(          \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
++\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\(       \)?vcvtps2ph xmm4,ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\(       \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\(       \)?vcvtps2ph xmm4,xmm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
++\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\(       \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae c3\t\(             \)?rdfsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae cb\t\(             \)?rdgsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae d3\t\(             \)?wrfsbase ebx\r
++\[^\r\n\]+:\tf3 0f ae db\t\(             \)?wrgsbase ebx\r
++End of assembler dump\\." "intel"
+Index: gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S	2016-10-20 20:55:50.853842324 +0200
+@@ -0,0 +1,98 @@
++/* Copyright 2011 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   This file is part of the gdb testsuite.  */
++
++	.globl _start
++_start:	.text
++
++/* gas/i386/x86-64-rdrnd.s */
++	.att_syntax prefix
++	rdrand %bx
++	rdrand %ebx
++	rdrand %rbx
++	rdrand %r8w
++	rdrand %r8d
++	rdrand %r8
++
++	.intel_syntax noprefix
++	rdrand bx
++	rdrand ebx
++	rdrand rbx
++	rdrand r8w
++	rdrand r8d
++	rdrand r8
++
++/* gas/i386/x86-64-f16c.s */
++	.att_syntax prefix
++	vcvtph2ps %xmm4,%ymm4
++	vcvtph2ps (%r8),%ymm8
++	vcvtph2ps %xmm4,%xmm6
++	vcvtph2ps (%rcx),%xmm4
++	vcvtps2ph $0x2,%ymm4,%xmm4
++	vcvtps2ph $0x2,%ymm8,(%r8)
++	vcvtps2ph $0x2,%xmm4,%xmm4
++	vcvtps2ph $0x2,%xmm4,(%rcx) 
++
++	.intel_syntax noprefix
++	vcvtph2ps ymm4,xmm4
++	vcvtph2ps ymm8,XMMWORD PTR [r8]
++	vcvtph2ps ymm4,[rcx]
++	vcvtph2ps xmm6,xmm4
++	vcvtph2ps xmm4,QWORD PTR [rcx]          
++	vcvtph2ps xmm4,[rcx]
++	vcvtps2ph xmm4,ymm4,0x2
++	vcvtps2ph XMMWORD PTR [rcx],ymm4,0x2    
++	vcvtps2ph [rcx],ymm4,0x2 
++	vcvtps2ph xmm4,xmm4,0x2
++	vcvtps2ph QWORD PTR [r8],xmm8,0x2       
++	vcvtps2ph [rcx],xmm4,0x2 
++
++/* gas/i386/x86-64-fsgs.s */
++	.att_syntax prefix
++	rdfsbase %ebx
++	rdfsbase %rbx
++	rdfsbase %r8d
++	rdfsbase %r8
++	rdgsbase %ebx
++	rdgsbase %rbx   
++	rdgsbase %r8d   
++	rdgsbase %r8    
++	wrfsbase %ebx   
++	wrfsbase %rbx   
++	wrfsbase %r8d   
++	wrfsbase %r8    
++	wrgsbase %ebx   
++	wrgsbase %rbx   
++	wrgsbase %r8d   
++	wrgsbase %r8    
++
++	.intel_syntax noprefix
++	rdfsbase ebx    
++	rdfsbase rbx    
++	rdfsbase r8d    
++	rdfsbase r8
++	rdgsbase ebx    
++	rdgsbase rbx    
++	rdgsbase r8d    
++	rdgsbase r8
++	wrfsbase ebx    
++	wrfsbase rbx    
++	wrfsbase r8d    
++	wrfsbase r8
++	wrgsbase ebx    
++	wrgsbase rbx    
++	wrgsbase r8d    
++	wrgsbase r8
+Index: gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.S
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.S	2016-10-20 20:55:50.853842324 +0200
+@@ -0,0 +1,67 @@
++/* Copyright 2011 Free Software Foundation, Inc.
++
++   This program is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by
++   the Free Software Foundation; either version 3 of the License, or
++   (at your option) any later version.
++
++   This program is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++   GNU General Public License for more details.
++
++   You should have received a copy of the GNU General Public License
++   along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++   This file is part of the gdb testsuite.  */
++
++	.globl _start
++_start:	.text
++
++/* gas/i386/rdrnd.s */
++	.att_syntax prefix
++	rdrand %bx
++	rdrand %ebx
++
++	.intel_syntax noprefix
++	rdrand bx
++	rdrand ebx
++
++/* gas/i386/f16c.s */
++	.att_syntax prefix
++	vcvtph2ps %xmm4,%ymm4
++	vcvtph2ps (%ecx),%ymm4
++	vcvtph2ps %xmm4,%xmm6
++	vcvtph2ps (%ecx),%xmm4
++	vcvtps2ph $0x2,%ymm4,%xmm4
++	vcvtps2ph $0x2,%ymm4,(%ecx) 
++	vcvtps2ph $0x2,%xmm4,%xmm4
++	vcvtps2ph $0x2,%xmm4,(%ecx) 
++
++	.intel_syntax noprefix
++	vcvtph2ps ymm4,xmm4
++	vcvtph2ps ymm4,XMMWORD PTR [ecx]
++	vcvtph2ps ymm4,[ecx]
++	vcvtph2ps xmm6,xmm4
++	vcvtph2ps xmm4,QWORD PTR [ecx]          
++	vcvtph2ps xmm4,[ecx]
++	vcvtps2ph xmm4,ymm4,0x2
++	vcvtps2ph XMMWORD PTR [ecx],ymm4,0x2    
++	vcvtps2ph [ecx],ymm4,0x2 
++	vcvtps2ph xmm4,xmm4,0x2
++	vcvtps2ph QWORD PTR [ecx],xmm4,0x2      
++	vcvtps2ph [ecx],xmm4,0x2 
++
++/* gas/i386/fsgs.s */
++	.att_syntax prefix
++	rdfsbase %ebx
++	rdgsbase %ebx
++	wrfsbase %ebx
++	wrgsbase %ebx
++
++	.intel_syntax noprefix
++	rdfsbase ebx    
++	rdgsbase ebx    
++	wrfsbase ebx    
++	wrgsbase ebx    
++

diff --git a/gdb-upstream.patch b/gdb-upstream.patch
index 0cee56f..2ba72db 100644
--- a/gdb-upstream.patch
+++ b/gdb-upstream.patch
@@ -409,3 +409,52 @@ index 6c10dfc..a1b8065 100644
  main (void)
 -- 
 2.7.4
+
+
+
+http://sourceware.org/ml/gdb-patches/2016-10/msg00613.html
+Subject: [testsuite patch] Fix gcc_compiled for gcc 6 & 7
+
+
+--IS0zKkzwUGydFO0o
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+
+Hi,
+
+OK for check-in?
+
+
+Jan
+
+--IS0zKkzwUGydFO0o
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline; filename=1
+
+gdb/testsuite/ChangeLog
+2016-10-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
+
+diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
+index 378eea0..7d9b198 100644
+--- a/gdb/testsuite/lib/gdb.exp
++++ b/gdb/testsuite/lib/gdb.exp
+@@ -3290,12 +3290,8 @@ proc get_compiler_info {{arg ""}} {
+     }
+ 
+     # Set the legacy symbols.
+-    set gcc_compiled     0
+-    if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 }
+-    if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 }
+-    if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 }
+-    if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 }
+-    if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 }
++    set gcc_compiled 0
++    regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled
+ 
+     # Log what happened.
+     verbose -log "get_compiler_info: $compiler_info"
+
+--IS0zKkzwUGydFO0o--
+

diff --git a/gdb.spec b/gdb.spec
index 27d810c..cd97654 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -26,7 +26,7 @@ Version: 7.12
 
 # 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: 25%{?dist}
+Release: 26%{?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
@@ -289,6 +289,9 @@ Patch254: gdb-6.6-testsuite-timeouts.patch
 #=fedoratest
 Patch258: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
 
+# Stop while intentionally stepping and the thread exit is met.
+Patch259: gdb-6.3-step-thread-exit-20050211-test.patch
+
 # Test kernel VDSO decoding while attaching to an i386 process.
 #=fedoratest
 Patch263: gdb-6.3-attach-see-vdso-test.patch
@@ -475,6 +478,10 @@ Patch547: gdb-test-dw2-aranges.patch
 #=fedoratest
 Patch548: gdb-test-expr-cumulative-archer.patch
 
+# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
+Patch565: gdb-physname-pr11734-test.patch
+Patch567: gdb-physname-pr12273-test.patch
+
 # Toolchain on sparc is slightly broken and debuginfo files are generated
 # with non 64bit aligned tables/offsets.
 # See for example readelf -S ../Xvnc.debug.
@@ -489,6 +496,9 @@ Patch548: gdb-test-expr-cumulative-archer.patch
 #=push+work
 Patch579: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
 
+# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
+Patch616: gdb-test-ivy-bridge.patch
+
 # Work around PR libc/13097 "linux-vdso.so.1" warning message.
 #=push
 Patch627: gdb-glibc-vdso-workaround.patch
@@ -544,6 +554,9 @@ Patch848: gdb-dts-rhel6-python-compat.patch
 # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
 Patch852: gdb-gnat-dwarf-crash-3of3.patch
 
+# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
+Patch861: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
+
 # VLA (Fortran dynamic arrays) from Intel + archer-jankratochvil-vla tests.
 Patch1058: gdb-vla-intel-fortran-strides.patch
 Patch1132: gdb-vla-intel-fortran-vla-strings.patch
@@ -560,9 +573,22 @@ Patch925: gdb-fortran-frame-string.patch
 # Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
 Patch927: gdb-python-gil.patch
 
+# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
+# crash.' (RH BZ 1156192).
+Patch977: gdb-rhbz1156192-recursive-dlopen-test.patch
+
 # Fix jit-reader.h for multi-lib.
 Patch978: gdb-jit-reader-multilib.patch
 
+# Fix '`catch syscall' doesn't work for parent after `fork' is called'
+# (Philippe Waroquiers, RH BZ 1149205).
+Patch984: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
+
+# Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
+# description: 'C++ (and objc): Internal error on unqualified name
+# re-set', PR 11657] (RH BZ 1186476).
+Patch991: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
+
 # Test 'info type-printers' Python error (RH BZ 1350436).
 Patch992: gdb-rhbz1350436-type-printers-error.patch
 
@@ -877,6 +903,7 @@ find -name "*.info*"|xargs rm -f
 %patch247 -p1
 %patch254 -p1
 %patch258 -p1
+%patch259 -p1
 %patch260 -p1
 %patch263 -p1
 %patch271 -p1
@@ -922,7 +949,10 @@ find -name "*.info*"|xargs rm -f
 %patch542 -p1
 %patch547 -p1
 %patch548 -p1
+%patch565 -p1
+%patch567 -p1
 %patch579 -p1
+%patch616 -p1
 %patch627 -p1
 %patch634 -p1
 %patch653 -p1
@@ -939,13 +969,17 @@ find -name "*.info*"|xargs rm -f
 %patch818 -p1
 %patch832 -p1
 %patch852 -p1
+%patch861 -p1
 %patch863 -p1
 %patch887 -p1
 %patch888 -p1
 %patch918 -p1
 %patch925 -p1
 %patch927 -p1
+%patch977 -p1
 %patch978 -p1
+%patch984 -p1
+%patch991 -p1
 %patch992 -p1
 %patch1026 -p1
 %patch1053 -p1
@@ -1306,10 +1340,12 @@ make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
 %if 0%{!?scl:1}
 mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec
 mv -f $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_prefix}/libexec/gdb
-# RHEL-6: ln: invalid option -- 'r'
-# https://bugzilla.redhat.com/show_bug.cgi?id=1384947
-# ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb
+%if 0%{?rhel:1} && 0%{?rhel} <= 6
+# RHEL-6: ln: invalid option -- 'r': https://bugzilla.redhat.com/show_bug.cgi?id=1384947
 ln -s $(realpath --relative-to=$RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_prefix}/libexec/gdb) $RPM_BUILD_ROOT%{_bindir}/gdb
+%else
+ln -s -r                                                 $RPM_BUILD_ROOT%{_prefix}/libexec/gdb  $RPM_BUILD_ROOT%{_bindir}/gdb
+%endif
 %endif
 
 # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
@@ -1536,6 +1572,9 @@ then
 fi
 
 %changelog
+* Thu Oct 20 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-26.fc25
+- Add missing testcases present in rhel6 GDB; some still FAIL.
+
 * Fri Oct 14 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-25.fc25
 - [rhel6] Fix .spec without devtoolset-6-build installed (RH BZ 1384947).
 

                 reply	other threads:[~2026-06-27 23:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260467738.1.10256792499979949654.rpms-gdb-29d49d94919c@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox