Support building on SLE-11 again.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=160
This commit is contained in:
Michael Matz 2017-05-01 02:01:32 +00:00 committed by Git OBS Bridge
parent 50918c72d5
commit 15e0c61e47
8 changed files with 50 additions and 1730 deletions

View File

@ -1,707 +0,0 @@
http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
2007-12-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files.
2008-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-interface.exp: Fix a testcase race.
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.S 2016-02-15 23:23:03.318502357 +0100
@@ -0,0 +1,628 @@
+/* Copyright 2007 Free Software Foundation, Inc.
+
+ 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
+
+ This file is part of the gdb testsuite.
+
+ This file was produced by:
+ $ gcj -S interface.java -ggdb2 -Wall -m32
+ from the .java file:
+ interface Interface
+ {
+ }
+ class Class implements Interface
+ {
+ }
+*/
+
+ .file "cc28Pp2B.jar"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+ .local _MT_Interface
+ .comm _MT_Interface,0,4
+ .data
+ .align 4
+ .type _catch_classes_Interface, @object
+ .size _catch_classes_Interface, 24
+_catch_classes_Interface:
+ .zero 24
+ .section .rodata
+ .align 2
+ .type _Utf1, @object
+ .size _Utf1, 4
+_Utf1:
+ .value 36121
+ .value 9
+ .ascii "Interface"
+ .zero 1
+.globl _ZN9Interface6class$E
+ .data
+ .align 32
+ .type _ZN9Interface6class$E, @object
+ .size _ZN9Interface6class$E, 144
+_ZN9Interface6class$E:
+ .long _ZTVN4java4lang5ClassE+8
+ .long 403000
+ .long _Utf1
+ .value 1536
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _MT_Interface
+ .value 0
+ .value 6
+ .long 0
+ .long 4
+ .value 0
+ .value 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _catch_classes_Interface
+ .long 0
+ .long 0
+ .value 0
+ .byte 1
+ .zero 1
+ .long 0
+ .value 0
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .hidden _ZN9Interface7class$$E
+.globl _ZN9Interface7class$$E
+ .section .rodata
+ .align 4
+ .type _ZN9Interface7class$$E, @object
+ .size _ZN9Interface7class$$E, 4
+_ZN9Interface7class$$E:
+ .long _ZN9Interface6class$E
+ .text
+ .align 2
+.globl _ZN5ClassC1Ev
+ .type _ZN5ClassC1Ev, @function
+_ZN5ClassC1Ev:
+.LFB2:
+ pushl %ebp
+.LCFI0:
+ movl %esp, %ebp
+.LCFI1:
+ subl $24, %esp
+.LCFI2:
+.LBB2:
+#if 0
+ .file 1 "interface.java"
+#else
+ .file "interface.java"
+#endif
+ .loc 1 4 0
+ movl 8(%ebp), %eax
+ movl %eax, -4(%ebp)
+ movl -4(%ebp), %eax
+ movl %eax, (%esp)
+ call _ZN4java4lang6ObjectC1Ev
+.LBE2:
+ leave
+ ret
+.LFE2:
+ .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev
+ .hidden _ZTVN5ClassE
+.globl _ZTVN5ClassE
+ .data
+ .align 32
+ .type _ZTVN5ClassE, @object
+ .size _ZTVN5ClassE, 40
+_ZTVN5ClassE:
+ .long 0
+ .long 0
+ .long _ZN5Class6class$E
+ .long 4
+ .long _ZN4java4lang6Object8finalizeEJvv
+ .long _ZN4java4lang6Object8hashCodeEJiv
+ .long _ZN4java4lang6Object6equalsEJbPS1_
+ .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv
+ .long _ZN4java4lang6Object5cloneEJPS1_v
+ .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv
+ .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev
+ .section .rodata
+ .align 2
+ .type _Utf2, @object
+ .size _Utf2, 4
+_Utf2:
+ .value 626
+ .value 6
+ .ascii "<init>"
+ .zero 1
+ .align 2
+ .type _Utf3, @object
+ .size _Utf3, 4
+_Utf3:
+ .value 39797
+ .value 3
+ .ascii "()V"
+ .zero 1
+ .data
+ .align 4
+ .type _MT_Class, @object
+ .size _MT_Class, 20
+_MT_Class:
+ .long _Utf2
+ .long _Utf3
+ .value 16384
+ .value -1
+ .long .L_ZN5ClassC1Ev0
+ .long 0
+ .align 4
+ .type _IF_Class, @object
+ .size _IF_Class, 4
+_IF_Class:
+ .long _ZN9Interface6class$E
+ .align 4
+ .type _catch_classes_Class, @object
+ .size _catch_classes_Class, 24
+_catch_classes_Class:
+ .zero 24
+ .section .rodata
+ .align 2
+ .type _Utf4, @object
+ .size _Utf4, 4
+_Utf4:
+ .value 47448
+ .value 5
+ .ascii "Class"
+ .zero 1
+.globl _ZN5Class6class$E
+ .data
+ .align 32
+ .type _ZN5Class6class$E, @object
+ .size _ZN5Class6class$E, 144
+_ZN5Class6class$E:
+ .long _ZTVN4java4lang5ClassE+8
+ .long 403000
+ .long _Utf4
+ .value 32
+ .zero 2
+ .long _ZN4java4lang6Object6class$E
+ .long 0
+ .long 0
+ .long 0
+ .long _MT_Class
+ .value 1
+ .value 6
+ .long 0
+ .long 4
+ .value 0
+ .value 0
+ .long _ZTVN5ClassE+8
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _catch_classes_Class
+ .long _IF_Class
+ .long 0
+ .value 1
+ .byte 1
+ .zero 1
+ .long 0
+ .value 0
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .hidden _ZN5Class7class$$E
+.globl _ZN5Class7class$$E
+ .section .rodata
+ .align 4
+ .type _ZN5Class7class$$E, @object
+ .size _ZN5Class7class$$E, 4
+_ZN5Class7class$$E:
+ .long _ZN5Class6class$E
+ .section .jcr,"aw",@progbits
+ .align 4
+ .long _ZN9Interface6class$E
+ .long _ZN5Class6class$E
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .align 4
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .long .LFB2
+ .long .LFE2-.LFB2
+ .byte 0x4
+ .long .LCFI0-.LFB2
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .align 4
+.LEFDE0:
+ .section .eh_frame,"a",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+.globl __gcj_personality_v0
+ .string "zP"
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .uleb128 0x5
+ .byte 0x0
+ .long __gcj_personality_v0
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .align 4
+.LECIE1:
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .long .LFB2
+ .long .LFE2-.LFB2
+ .uleb128 0x0
+ .byte 0x4
+ .long .LCFI0-.LFB2
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .align 4
+.LEFDE1:
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .long .LFB2-.Ltext0
+ .long .LCFI0-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 4
+ .long .LCFI0-.Ltext0
+ .long .LCFI1-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 8
+ .long .LCFI1-.Ltext0
+ .long .LFE2-.Ltext0
+ .value 0x2
+ .byte 0x75
+ .sleb128 8
+ .long 0x0
+ .long 0x0
+ .section .debug_info
+ .long 0x117
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .string "GNU Java 4.3.0 20071221 (experimental)"
+ .byte 0xb
+ .string "interface.java"
+ .string "/home/jkratoch/redhat/bz371831"
+ .long .Ltext0
+ .long .Letext0
+ .long .Ldebug_line0
+ .uleb128 0x2
+ .string "Interface"
+ .byte 0x4
+ .byte 0x1
+ .byte 0x0
+ .long 0x8e
+ .long 0x8e
+ .uleb128 0x3
+ .long 0x8e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .byte 0x0
+ .uleb128 0x4
+ .string "java.lang.Object"
+ .byte 0x1
+ .uleb128 0x5
+ .string "Class"
+ .byte 0x4
+ .byte 0x1
+ .byte 0x0
+ .long 0x8e
+ .long 0xe8
+ .uleb128 0x3
+ .long 0x8e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .uleb128 0x6
+ .long 0x6e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x7
+ .byte 0x1
+ .string "<init>"
+ .byte 0x1
+ .byte 0x0
+ .string "_ZN5ClassC1Ev"
+ .byte 0x1
+ .uleb128 0x8
+ .long 0xe8
+ .byte 0x1
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .byte 0x4
+ .long 0xa1
+ .uleb128 0xa
+ .long 0xc6
+ .long .LFB2
+ .long .LFE2
+ .long .LLST0
+ .long 0x114
+ .uleb128 0xb
+ .long 0xe8
+ .byte 0x2
+ .byte 0x91
+ .sleb128 0
+ .uleb128 0xc
+ .long 0x114
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -12
+ .byte 0x0
+ .uleb128 0x9
+ .byte 0x4
+ .long 0x8e
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x25
+ .uleb128 0x8
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x1b
+ .uleb128 0x8
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x38
+ .byte 0x1
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x1d
+ .uleb128 0x13
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x1c
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .uleb128 0x32
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x2
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0x2
+ .byte 0x1
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x1d
+ .uleb128 0x13
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0x1c
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .uleb128 0x4c
+ .uleb128 0xb
+ .uleb128 0x32
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x2007
+ .uleb128 0x8
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x34
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x47
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x15
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x11b
+ .long 0xee
+ .string "()"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x1c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x4
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .long .Ltext0
+ .long .Letext0-.Ltext0
+ .long 0x0
+ .long 0x0
+ .ident "GCC: (GNU) 4.3.0 20071221 (experimental)"
+ .section .note.GNU-stack,"",@progbits
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.arch/i386-interface.exp 2016-02-15 23:23:15.978593556 +0100
@@ -0,0 +1,59 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# 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
+
+# This file is part of the gdb testsuite.
+
+# Test basis recognization of DW_TAG_interface_type.
+# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE.
+
+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then {
+ verbose "Skipping i386 Java DW_TAG_interface_type test."
+ return
+}
+
+set testfile "i386-interface"
+set srcfile ${testfile}.S
+set binfile [standard_output_file ${testfile}.o]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } {
+ untested i386-gnu-cfi.exp
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set language java"
+
+set test "ptype Interface"
+gdb_test_multiple $test $test {
+ -re "type = class Interface *extends java.lang.Object \{.*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "ptype Class"
+gdb_test_multiple $test $test {
+ -re "type = class Class *extends java.lang.Object implements Interface \{.*$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -1,44 +0,0 @@
bison-3.0.4-4.fc24.x86_64
vs.
bison-2.7-4.el7.x86_64
bison:
8d0b7cef7df7fead44b9574cee342de336008625 tags/v3.0.1~2
parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
ada-lex.c:113:0: error: "YY_NULL" redefined [-Werror]
#define YY_NULL 0
ada-exp.c:158:0: note: this is the location of the previous definition
# define YY_NULL nullptr
*-exp.c cp-name-parser.c
vs.
ada-lex.c
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr
# else
# define YY_NULL 0
# endif
# endif
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULLPTR nullptr
# else
# define YY_NULLPTR 0
# endif
# endif
--- gdb-clean712/gdb/Makefile.in 2016-08-29 09:16:15.505393928 +0200
+++ gdb-clean712/gdb/Makefile.in 2016-09-07 13:32:34.744270346 +0200
@@ -1900,6 +1945,7 @@ po/$(PACKAGE).pot: force
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e '/^#line.*y.tab.c/d' \
+ -e 's/\<YY_NULL\>/YY_NULLPTR/g' \
< $@.tmp > $@
rm -f $@.tmp
.l.c:

View File

@ -1,80 +0,0 @@
http://sourceware.org/ml/gdb-patches/2016-09/msg00082.html
Subject: [testsuite patch] Fix false FAIL in gdb.cp/casts.exp
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
gcc-6.2.1-1.fc26.x86_64
gdb compile failed, /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected primary-expression before 'int'
decltype(int x)
^~~
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected ')' before 'int'
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:1: error: expected unqualified-id before 'decltype'
decltype(int x)
^~~~~~~~
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc: In function 'int main(int, char**)':
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:59:14: error: expected primary-expression before 'decltype'
double y = decltype(2);
^~~~~~~~
'decltype' is a registered keyword since C++11 which is now a default for GCC.
OK for check-in?
Jan
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/testsuite/ChangeLog
2016-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/casts.cc: Rename decltype to int_to_double.
* gdb.cp/casts.exp (whatis decltype(5)): Rename to ...
(whatis int_to_double(5)): ... here.
diff --git a/gdb/testsuite/gdb.cp/casts.cc b/gdb/testsuite/gdb.cp/casts.cc
index 43f112f..4f68ba0 100644
--- a/gdb/testsuite/gdb.cp/casts.cc
+++ b/gdb/testsuite/gdb.cp/casts.cc
@@ -37,7 +37,7 @@ struct DoublyDerived : public VirtuallyDerived,
// Confuse a simpler approach.
double
-decltype(int x)
+int_to_double(int x)
{
return x + 2.0;
}
@@ -56,7 +56,7 @@ main (int argc, char **argv)
Alpha *ad = &derived;
Alpha *add = &doublyderived;
- double y = decltype(2);
+ double y = int_to_double(2);
return 0; /* breakpoint spot: casts.exp: 1 */
}
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index 34a2492..5798098 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -112,7 +112,7 @@ gdb_test "print reinterpret_cast<A &> (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \
# Test that keyword shadowing works.
-gdb_test "whatis decltype(5)" " = double"
+gdb_test "whatis int_to_double(5)" " = double"
# Basic tests using typeof.
--ikeVEW9yuYc//A+q--

View File

@ -1,79 +0,0 @@
http://sourceware.org/ml/gdb-patches/2016-09/msg00083.html
Subject: [testsuite patch] Fix C++11 compilation failure for gdb.cp/m-static.exp
--y0ulUmNC+osPPQO6
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline
Hi,
gcc-6.2.1-1.fc26.x86_64
g++ -std=c++03:
no warnings
g++:
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:0:
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:34: error: $B!F(Bconstexpr$B!G(B needed for in-class initialization of static data member $B!F(Bconst float gnu_obj_4::somewhere$B!G(B of non-integral type [-fpermissive]
static const float somewhere = 3.14159;
^~~~~~~
clang++:
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
static const float somewhere = 3.14159;
^ ~~~~~~~
1 warning generated.
clang++ -std=c++11:
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
static const float somewhere = 3.14159;
^ ~~~~~~~
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:3: note: add 'constexpr'
static const float somewhere = 3.14159;
^
constexpr
1 error generated.
OK for check-in?
After the fix out of the 4 combinations above only this one remains non-empty:
clang++:
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
static const float somewhere = 3.14159;
^ ~~~~~~~
1 warning generated.
Jan
--y0ulUmNC+osPPQO6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/testsuite/ChangeLog
2016-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/m-static.h (gnu_obj_4::somewhere): Use constexpr for C++11.
diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h
index bcedfff..2992463 100644
--- a/gdb/testsuite/gdb.cp/m-static.h
+++ b/gdb/testsuite/gdb.cp/m-static.h
@@ -6,6 +6,9 @@ class gnu_obj_4
static const int elsewhere;
static const int nowhere;
static const int everywhere = 317;
+#if __cplusplus >= 201103L
+ constexpr
+#endif
static const float somewhere = 3.14159;
// try to ensure test4 is actually allocated
--y0ulUmNC+osPPQO6--

View File

@ -1,83 +0,0 @@
http://sourceware.org/ml/gdb-patches/2016-10/msg00652.html
Subject: [testsuite patch] Fix false FAIL for gdb.base/morestack.exp
--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
since
[commit] [testsuite patch] Fix gcc_compiled for gcc 6 & 7
https://sourceware.org/ml/gdb-patches/2016-10/msg00620.html
there has started running again
Running gdb/testsuite/gdb.base/morestack.exp ...
+FAIL: gdb.base/morestack.exp: continue
+PASS: gdb.base/morestack.exp: up 3000
but as you can see it FAILs now - on Fedora 24 x86_64 (although for example it
still PASSes on CentOS-7.2 x86_64).
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff787c7bb in malloc_consolidate (av=av@entry=0x7ffff7bbcb00 <main_arena>) at malloc.c:4181
4181 unlink(av, nextchunk, bck, fwd);
(gdb) bt
#0 0x00007ffff787c7bb in malloc_consolidate (av=av@entry=0x7ffff7bbcb00 <main_arena>) at malloc.c:4181
#1 0x00007ffff787f235 in _int_malloc (av=av@entry=0x7ffff7bbcb00 <main_arena>, bytes=bytes@entry=1024) at malloc.c:3448
[...]
#8 0x00007ffff784c5ac in _IO_vfprintf_internal (s=0x7ffff7bbd600 <_IO_2_1_stdout_>, format=<optimized out>, ap=ap@entry=0x7ffff77fd7f8) at vfprintf.c:1631
#9 0x00007ffff7853939 in __printf (format=<optimized out>) at printf.c:33
#10 0x0000000000400d6b in down ()
#11 0x0000000000400f2c in __morestack ()
#12 0x0000000000400dda in down ()
[...]
This apparently is due to - man gcc - -fsplit-stack:
When code compiled with -fsplit-stack calls code compiled without
-fsplit-stack, there may not be much stack space available for the
latter code to run. If compiling all code, including library code,
with -fsplit-stack is not an option, then the linker can fix up these
calls so that the code compiled without -fsplit-stack always has
a large stack. Support for this is implemented in the gold linker in
GNU binutils release 2.21 and later.
Personally I do not understand why gold is not the default linker as GNU ld is
unusably slow (6x) for C++ but that is off-topic here.
OK for check-in?
Thanks,
Jan
--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/testsuite/ChangeLog
2016-10-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first.
diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp
index 12f5d28..caa85b8 100644
--- a/gdb/testsuite/gdb.base/morestack.exp
+++ b/gdb/testsuite/gdb.base/morestack.exp
@@ -23,7 +23,11 @@ if {$gcc_compiled == 0} {
standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {additional_flags=-fsplit-stack}] } {
+# -fuse-ld=gold is used for calling printf code built without -fsplit-stack
+# which could crash otherise. See GCC documentation of -fsplit-stack.
+set opts "additional_flags=-fsplit-stack"
+if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile [list $opts additional_flags=-fuse-ld=gold]] \
+ && [prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts] } {
return -1
}
--HlL+5n6rz5pIUxbD--

View File

@ -1,722 +0,0 @@
commit 2c29df25b7c2ff006b45afd80ee6dd734ebbd47c
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Sun Sep 11 16:53:09 2016 -0400
Fix false FAIL on gdb.base/stap-probe.exp, due to ICF optimization
GCC 6's ICF optimization pass is making the declaration of 'm1' and
'm2', on gdb.base/stap-probe.c, to be unified. However, this leads to
only one instance of the probe 'two' being created, which causes a
failure on the testsuite (which expects a multi-location breakpoint to
be inserted on the probe).
This patch fixes this failure by declaring a dummy variable on 'm1',
and using it as an argument to m1's version of probe 'two'. Since we
do not care about the contents of the functions nor about the
arguments of each probe 'two', this is OK.
gdb/testsuite/ChangeLog:
2016-09-11 Sergio Durigan Junior <sergiodj@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to
make m1's definition to be different from m2's. Use 'dummy' as an
argument for probe 'two'.
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,3 +1,10 @@
+2016-09-11 Sergio Durigan Junior <sergiodj@redhat.com>
+ Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to
+ make m1's definition to be different from m2's. Use 'dummy' as an
+ argument for probe 'two'.
+
2016-09-10 Jon Beniston <jon@beniston.com>
* lib/mi-support.exp (mi_gdb_target_load): Use target_sim_options
--- a/gdb/testsuite/gdb.base/stap-probe.c
+++ b/gdb/testsuite/gdb.base/stap-probe.c
@@ -53,8 +53,13 @@ struct funcs
static void
m1 (void)
{
+ /* m1 and m2 are equivalent, but because of some compiler
+ optimizations we have to make each of them unique. This is why
+ we have this dummy variable here. */
+ volatile int dummy = 0;
+
if (TEST2)
- STAP_PROBE (test, two);
+ STAP_PROBE1 (test, two, dummy);
}
static void
commit f389f6fef76d7cf8e8beb7061edff2155c284898
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed Oct 5 21:56:46 2016 +0200
testsuite: Fix recent GCC FAIL: gdb.arch/i386-signal.exp
gcc-6.2.1-2.fc24.x86_64
(gdb) backtrace 10^M
(gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10
(gdb) disas/s
Dump of assembler code for function main:
.../gdb/testsuite/gdb.arch/i386-signal.c:
30 {
0x000000000040057f <+0>: push %rbp
0x0000000000400580 <+1>: mov %rsp,%rbp
31 setup ();
0x0000000000400583 <+4>: callq 0x400590 <setup>
=> 0x0000000000400588 <+9>: mov $0x0,%eax
32 }
0x000000000040058d <+14>: pop %rbp
0x000000000040058e <+15>: retq
End of assembler dump.
The .exp patch is an obvious typo fix I think. The regex was written to
accept "ADDR in main" and I find it OK as checking .debug_line validity is not
the purpose of this testfile.
gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at
all so there was no problem with .debug_line.
gdb/testsuite/ChangeLog
2016-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,3 +1,7 @@
+2016-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo.
+
2016-10-05 Yao Qi <yao.qi@linaro.org>
* lib/gdb.exp (support_complex_tests): Return zero if
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
@@ -35,6 +35,6 @@ gdb_load ${binfile}
runto func
gdb_test "backtrace 10" \
- "#0 ($hex in )?func.*\r\n#1 <signal handler called>\r\n#2 ($hex in)?main.*"
+ "#0 ($hex in )?func.*\r\n#1 <signal handler called>\r\n#2 ($hex in )?main.*"
gdb_test "finish" "Run till exit from \#0 func.*<signal handler called>"
commit 20c2c024c1e89e402a57e8c3577fb9777709d9a4
Author: Carl E. Love <carll@oc4738070240.ibm.com>
Date: Fri Aug 19 11:06:38 2016 -0700
Fix missing files for ld when test suite not compiled in the source directory
This patch fixes an issues with six test suite expect files that do not
run correctly when the test suite is not built in the source directory. The
issue is these tests are not using the current "standard_testfile" call
but rather using the older set command to initialize the "testfile",
"srcfile" and "binprefix" variables or are missing the set for the
"binprefix" variable.
-----------------------------------------------
gdb/testsuite/ChangeLog
2016-08-19 Carl Love <cel@us.ibm.com>
* gdb.arch/altivec-regs.exp: Use standard_testfile instead of
maintaining separate logic for constructing the output path.
* gdb.arch/powerpc-d128-regs.exp: Likewise.
* gdb.arch/ppc-dfp.exp: Likewise.
* gdb.arch/ppc-fp.exp: Likewise.
* gdb.arch/vsx-regs.exp: Likewise.
* gdb.arch/altivec-abi.exp: Likewise, plus added local variable
binprefix for generating the additional binary files.
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,3 +1,14 @@
+2016-08-19 Carl Love <cel@us.ibm.com>
+
+ * gdb.arch/altivec-regs.exp: Use standard_testfile instead of
+ maintaining separate logic for constructing the output path.
+ * gdb.arch/powerpc-d128-regs.exp: Likewise.
+ * gdb.arch/ppc-dfp.exp: Likewise.
+ * gdb.arch/ppc-fp.exp: Likewise.
+ * gdb.arch/vsx-regs.exp: Likewise.
+ * gdb.arch/altivec-abi.exp: Likewise, plus added local variable
+ binprefix for generating the additional binary files.
+
2016-08-19 Pedro Alves <palves@redhat.com>
* gdb.trace/mi-trace-frame-collected.exp
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -26,9 +26,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return
}
-set testfile "altivec-abi"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
@@ -146,6 +144,8 @@ proc altivec_abi_tests { extra_flags force_abi } {
}
if [test_compiler_info gcc*] {
+ set binprefix ${binfile}
+
with_test_prefix "default ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec" "auto"
}
@@ -156,23 +156,23 @@ if [test_compiler_info gcc*] {
# On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec
# was broken, so skip those tests there.
if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
- set binfile ${objdir}/${subdir}/${testfile}-ge-ge
+ set binfile ${binprefix}-ge-ge
with_test_prefix "generic ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic"
}
- set binfile ${objdir}/${subdir}/${testfile}-ge-auto
+ set binfile ${binprefix}-ge-auto
with_test_prefix "generic ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto"
}
}
- set binfile ${objdir}/${subdir}/${testfile}-av-av
+ set binfile ${binprefix}-av-av
with_test_prefix "AltiVec ABI, forced" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec"
}
- set binfile ${objdir}/${subdir}/${testfile}-av-auto
+ set binfile ${binprefix}-av-auto
with_test_prefix "AltiVec ABI, auto" {
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
}
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -27,9 +27,7 @@ if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
return
}
-set testfile "altivec-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
set compile_flags {debug nowarnings}
if [get_compiler_info] {
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -25,9 +25,7 @@ if ![istarget "powerpc64*-*"] then {
return
}
-set testfile "powerpc-d128-regs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
untested powerpc-d128-regs.exp
--- a/gdb/testsuite/gdb.arch/ppc-dfp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return
}
-set testfile "ppc-dfp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
--- a/gdb/testsuite/gdb.arch/ppc-fp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-fp.exp
@@ -21,9 +21,7 @@ if ![istarget "powerpc*"] then {
return
}
-set testfile "ppc-fp"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
if [get_compiler_info] {
warning "get_compiler failed"
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -24,9 +24,7 @@ if {![istarget "powerpc*"] || [skip_vsx_tests]} then {
return
}
-set testfile "vsx-regs"
-set binfile ${objdir}/${subdir}/${testfile}
-set srcfile ${testfile}.c
+standard_testfile
set compile_flags {debug nowarnings quiet}
if [get_compiler_info] {
http://sourceware.org/ml/gdb-patches/2016-10/msg00258.html
Subject: [testsuite obv] Use standard_output_file
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Tue, 11 Oct 2016 16:43:58 +0200
Subject: [PATCH] testsuite: Use standard_output_file
Subject: [PATCH] testsuite: Use standard_output_file
gdb/testsuite/ChangeLog
2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/powerpc-prologue.exp: Use standard_output_file.
* gdb.arch/ppc64-symtab-cordic.exp: Likewise.
* gdb.arch/vsx-regs.exp: Likewise.
---
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/gdb.arch/powerpc-prologue.exp | 2 +-
gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp | 4 ++--
gdb/testsuite/gdb.arch/vsx-regs.exp | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9c7df29..b6ba0ec 100644
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,3 +1,9 @@
+2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.arch/powerpc-prologue.exp: Use standard_output_file
+ * gdb.arch/ppc64-symtab-cordic.exp: Likewise.
+ * gdb.arch/vsx-regs.exp: Likewise.
+
2016-10-07 Yao Qi <yao.qi@linaro.org>
* gdb.xml/tdesc-regs.exp: Set regdir to "arm/".
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
index 341ae02..0c74d7e 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
@@ -24,7 +24,7 @@ if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
set testfile "powerpc-prologue"
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
# Don't use "debug", so that we don't have line information for the assembly
# fragments.
diff --git a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
index c8cb429..3fdc490 100644
--- a/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
+++ b/gdb/testsuite/gdb.arch/ppc64-symtab-cordic.exp
@@ -21,9 +21,9 @@ if {![istarget "powerpc*"] || ![is_lp64_target]} {
standard_testfile
set kobz2file ${srcdir}/${subdir}/cordic.ko.bz2
-set kofile ${objdir}/${subdir}/cordic.ko
+set kofile [standard_output_file cordic.ko]
set kodebugbz2file ${srcdir}/${subdir}/cordic.ko.debug.bz2
-set kodebugfile ${objdir}/${subdir}/cordic.ko.debug
+set kodebugfile [standard_output_file cordic.ko.debug]
if {[catch "system \"bzip2 -dc ${kobz2file} >${kofile}\""] != 0} {
untested "failed bzip2 for ${kobz2file}"
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index 307f12a..31e58e6 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -152,7 +152,7 @@ for {set i 0} {$i < 32} {incr i 1} {
# later when loading the core file (i.e., different register values for different
# vector register banks).
-set corefile "${objdir}/${subdir}/vsx-core.test"
+set corefile [standard_output_file vsx-core.test]
set core_supported [gdb_gcore_cmd "$corefile" "Save a VSX-enabled corefile"]
# Now run the F32~F63/VR0~VR31 tests.
--
2.7.4
http://sourceware.org/ml/gdb-patches/2016-10/msg00268.html
Subject: [testsuite obv] Fix gdb.arch/powerpc-prologue.c compilation
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Tue, 11 Oct 2016 19:09:05 +0200
Subject: [PATCH] testsuite: Fix gdb.arch/powerpc-prologue.c compilation
Subject: [PATCH] testsuite: Fix gdb.arch/powerpc-prologue.c compilation
gcc-6.2.1
gdb compile failed, gdb/testsuite/gdb.arch/powerpc-prologue.c: In function 'main':
gdb/testsuite/gdb.arch/powerpc-prologue.c:32:3: warning: implicit declaration of function 'optimized_1' [-Wimplicit-function-declaration]
optimized_1 ();
^~~~~~~~~~~
gdb/testsuite/ChangeLog
2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/powerpc-prologue.c (optimized_1): New declaration.
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.arch/powerpc-prologue.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b6ba0ec..b4ccd4a 100644
### a/gdb/testsuite/ChangeLog
### b/gdb/testsuite/ChangeLog
## -1,5 +1,9 @@
2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.arch/powerpc-prologue.c (optimized_1): New declaration.
+
+2016-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* gdb.arch/powerpc-prologue.exp: Use standard_output_file
* gdb.arch/ppc64-symtab-cordic.exp: Likewise.
* gdb.arch/vsx-regs.exp: Likewise.
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.c b/gdb/testsuite/gdb.arch/powerpc-prologue.c
index 6c10dfc..a1b8065 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.c
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.c
@@ -24,6 +24,7 @@
#endif
void gdb2029 (void);
+void optimized_1 (void);
int
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--
commit 1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6
Author: Nick Clifton <nickc@redhat.com>
Date: Fri Feb 3 09:04:21 2017 +0000
Fix compile time warning messages when compiling binutils with gcc 7.0.1.
PR 21096
bfd * coffcode.h (coff_write_object_contents): Enlarge size of
s_name_buf in order to avoid compile time warning about possible
integer truncation.
* elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
32-bits of insn value before printing into buffer.
opcodes * aarch64-opc.c (print_register_list): Ensure that the register
list index will fir into the tb buffer.
(print_register_offset_address): Likewise.
* tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf.
### a/bfd/ChangeLog
### b/bfd/ChangeLog
## -1,3 +1,12 @@
+2017-02-03 Nick Clifton <nickc@redhat.com>
+
+ PR 21096
+ * coffcode.h (coff_write_object_contents): Enlarge size of
+ s_name_buf in order to avoid compile time warning about possible
+ integer truncation.
+ * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
+ 32-bits of insn value before printing into buffer.
+
2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
* elfxx-mips.c (mips_elf_hash_sort_data): Add
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -3755,7 +3755,9 @@ coff_write_object_contents (bfd * abfd)
NUL-terminated. We use a temporary buffer so that we can still
sprintf all eight chars without splatting a terminating NUL
over the first byte of the following member (s_paddr). */
- char s_name_buf[SCNNMLEN + 1];
+ /* PR 21096: The +20 is to stop a bogus warning from gcc7 about
+ a possible buffer overflow. */
+ char s_name_buf[SCNNMLEN + 1 + 20];
/* An inherent limitation of the /nnnnnnn notation used to indicate
the offset of the long name in the string table is that we
@@ -3770,9 +3772,10 @@ coff_write_object_contents (bfd * abfd)
return FALSE;
}
- /* snprintf not strictly necessary now we've verified the value
- has less than eight ASCII digits, but never mind. */
- snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long) string_size);
+ /* We do not need to use snprintf here as we have already verfied
+ that string_size is not too big, plus we have an overlarge
+ buffer, just in case. */
+ sprintf (s_name_buf, "/%lu", (unsigned long) string_size);
/* Then strncpy takes care of any padding for us. */
strncpy (section.s_name, s_name_buf, SCNNMLEN);
string_size += len + 1;
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -14949,7 +14949,6 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info)
{
int num = 0;
bfd_byte *contents;
- unsigned long insn;
FILE *ex9_import_file;
int update_ex9_table;
struct elf_nds32_link_hash_table *table;
@@ -14963,6 +14962,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info)
/* Read instructions from the input file and build the list. */
while (!feof (ex9_import_file))
{
+ unsigned long insn;
char *code;
struct elf_nds32_insn_times_entry *ptr;
size_t nread;
@@ -14973,7 +14973,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info)
break;
insn = bfd_getb32 (contents);
code = bfd_malloc (sizeof (char) * 9);
- snprintf (code, 9, "%08lx", insn);
+ snprintf (code, 9, "%08lx", (insn & 0xffffffff));
ptr = bfd_malloc (sizeof (struct elf_nds32_insn_times_entry));
ptr->string = code;
ptr->order = num;
### a/opcodes/ChangeLog
### b/opcodes/ChangeLog
## -1,3 +1,11 @@
+2017-02-03 Nick Clifton <nickc@redhat.com>
+
+ PR 21096
+ * aarch64-opc.c (print_register_list): Ensure that the register
+ list index will fir into the tb buffer.
+ (print_register_offset_address): Likewise.
+ * tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf.
+
2017-01-27 Alexis Deruell <alexis.deruelle@gmail.com>
PR 21056
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -2865,7 +2865,8 @@ print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd,
/* Prepare the index if any. */
if (opnd->reglist.has_index)
- snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index);
+ /* PR 21096: The %100 is to silence a warning about possible truncation. */
+ snprintf (tb, 8, "[%" PRIi64 "]", (opnd->reglist.index % 100));
else
tb[0] = '\0';
@@ -2344,7 +2344,9 @@ print_register_offset_address (char *buf
if (print_extend_p)
{
if (print_amount_p)
- snprintf (tb, sizeof (tb), ",%s #%d", shift_name, opnd->shifter.amount);
+ snprintf (tb, sizeof (tb), ",%s #%d", shift_name,
+ /* PR 21096: The %100 is to silence a warning about possible truncation. */
+ (opnd->shifter.amount % 100));
else
snprintf (tb, sizeof (tb), ",%s", shift_name);
}
--- a/opcodes/tic6x-dis.c
+++ b/opcodes/tic6x-dis.c
@@ -316,7 +316,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
const char *parallel;
const char *cond = "";
const char *func_unit;
- char func_unit_buf[7];
+ char func_unit_buf[8];
unsigned int func_unit_side = 0;
unsigned int func_unit_data_side = 0;
unsigned int func_unit_cross = 0;
@@ -703,8 +703,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
if (opc->flags & TIC6X_FLAG_INSN16_BSIDE && func_unit_side == 1)
func_unit_cross = 1;
- snprintf (func_unit_buf, 7, " .%c%u%s%s", func_unit_char,
- func_unit_side, (func_unit_cross ? "X" : ""), data_str);
+ snprintf (func_unit_buf, sizeof func_unit_buf, " .%c%u%s%s",
+ func_unit_char, func_unit_side,
+ (func_unit_cross ? "X" : ""), data_str);
func_unit = func_unit_buf;
}
commit db7b55faa1a11e632ddf57505c9bb64bc783471a
Author: Nick Clifton <nickc@redhat.com>
Date: Fri Dec 16 10:59:36 2016 +0000
Fix compile time warning building arm-dis.c
### a/opcodes/ChangeLog
### b/opcodes/ChangeLog
## -1,3 +1,8 @@
+2016-12-16 Nick Clifton <nickc@redhat.com>
+
+ * arm-dis.c (print_insn_thumb32): Fix compile time warning
+ computing value_in_comment.
+
2016-12-14 Maciej W. Rozycki <macro@imgtec.com>
* mips-dis.c (mips_convert_abiflags_ases): New function.
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -5759,7 +5759,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if (off || !U)
{
func (stream, ", #%c%u", U ? '+' : '-', off * 4);
- value_in_comment = off * 4 * U ? 1 : -1;
+ value_in_comment = (off && U) ? 1 : -1;
}
func (stream, "]");
if (W)
@@ -5771,7 +5771,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if (W)
{
func (stream, "#%c%u", U ? '+' : '-', off * 4);
- value_in_comment = off * 4 * U ? 1 : -1;
+ value_in_comment = (off && U) ? 1 : -1;
}
else
{
commit 97e64e5ab19dbf6a9babd711e8deec5545520954
Author: Yao Qi <yao.qi@linaro.org>
Date: Fri Sep 23 17:27:26 2016 +0100
Replace sprintf with xsnprintf in nat/linux-osdata.c
I see the following build warning when I build GDB with GCC trunk.
../../binutils-gdb/gdb/nat/linux-osdata.c: In function LONGEST linux_xfer_osdata_fds(gdb_byte*, ULONGEST, ULONGEST):
../../binutils-gdb/gdb/nat/linux-osdata.c:767:1: error: %s directive writing between 0 and 255 bytes into a region of size 11 [-Werror=format-length=]
linux_xfer_osdata_fds (gdb_byte *readbuf,
^~~~~~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/nat/linux-osdata.c:800:51: note: format output between 7 and 262 bytes into a destination of size 17
sprintf (procentry, "/proc/%s", dp->d_name);
^
../../binutils-gdb/gdb/nat/linux-osdata.c: In function LONGEST linux_xfer_osdata_threads(gdb_byte*, ULONGEST, ULONGEST):
../../binutils-gdb/gdb/nat/linux-osdata.c:555:1: error: %s directive writing between 0 and 255 bytes into a region of size 11 [-Werror=format-length=]
linux_xfer_osdata_threads (gdb_byte *readbuf,
^~~~~~~~~~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/nat/linux-osdata.c:588:51: note: format output between 7 and 262 bytes into a destination of size 17
sprintf (procentry, "/proc/%s", dp->d_name);
^
cc1plus: all warnings being treated as errors
The warning is a false positive, but we can workaround it by replacing
sprintf with xsnprintf. On the other hand, it is always preferred to
use xsnprintf.
gdb:
2016-09-23 Yao Qi <yao.qi@linaro.org>
* nat/linux-osdata.c (linux_xfer_osdata_threads): Replace
sprintf with xsnprintf.
(linux_xfer_osdata_fds): Likewise.
### a/gdb/ChangeLog
### b/gdb/ChangeLog
## -1,3 +1,9 @@
+2016-09-23 Yao Qi <yao.qi@linaro.org>
+
+ * nat/linux-osdata.c (linux_xfer_osdata_threads): Replace
+ sprintf with xsnprintf.
+ (linux_xfer_osdata_fds): Likewise.
+
2016-09-23 Pedro Alves <palves@redhat.com>
* Makefile.in (SFILES): Add common/new-op.c.
--- a/gdb/nat/linux-osdata.c
+++ b/gdb/nat/linux-osdata.c
@@ -585,7 +585,8 @@ linux_xfer_osdata_threads (gdb_byte *readbuf,
|| NAMELEN (dp) > sizeof ("4294967295") - 1)
continue;
- sprintf (procentry, "/proc/%s", dp->d_name);
+ xsnprintf (procentry, sizeof (procentry), "/proc/%s",
+ dp->d_name);
if (stat (procentry, &statbuf) == 0
&& S_ISDIR (statbuf.st_mode))
{
@@ -797,7 +798,8 @@ linux_xfer_osdata_fds (gdb_byte *readbuf,
|| NAMELEN (dp) > sizeof ("4294967295") - 1)
continue;
- sprintf (procentry, "/proc/%s", dp->d_name);
+ xsnprintf (procentry, sizeof (procentry), "/proc/%s",
+ dp->d_name);
if (stat (procentry, &statbuf) == 0
&& S_ISDIR (statbuf.st_mode))
{

View File

@ -1,12 +1,19 @@
-------------------------------------------------------------------
Thu Apr 27 14:39:44 UTC 2017 - matz@suse.com
- Rebase to gdb 7.99.90 (prerelease of gdb 8)
- Rebase to gdb 7.99.90 (prerelease of gdb 8) [fate #319573]
- Updated libstdc++ pretty printers to
gdb-libstdc++-v3-python-6.3.1-20170212.tar.bz2.
- Added patches from fedora:
gdb-release-werror.patch
gdb-rhbz1398387-tab-crash-test.patch
- Removed obsoleted patches:
gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
gdb-bison-old.patch
gdb-testsuite-casts.patch
gdb-testsuite-m-static.patch
gdb-upstream.patch
gdb-testsuite-morestack-gold.patch
-------------------------------------------------------------------
Mon Apr 3 12:48:42 UTC 2017 - rguenther@suse.com

View File

@ -228,8 +228,13 @@ Patch1005: gdb-7.10-swo18929.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc
BuildRequires: gcc-c++
%if 0%{suse_version} > 1110
%define gcc gcc
%else
%define gcc gcc48
%endif
BuildRequires: %{gcc}
BuildRequires: %{gcc}-c++
BuildRequires: gettext
BuildRequires: glibc-devel
%if 0%{suse_version} > 1110
@ -280,18 +285,18 @@ ExclusiveArch: noarch i386 x86_64 ppc ppc64 ia64 s390 s390x
BuildRequires: dejagnu
BuildRequires: sharutils
# gcc-objc++ is not covered by the GDB testsuite.
BuildRequires: gcc-fortran
%if 0%{?gcc_version} < 7
BuildRequires: gcc-java
BuildRequires: %{gcc}-fortran
%if 0%{?gcc_version} < 7 && 0%{suse_version} > 1110
BuildRequires: %{gcc}-java
%endif
BuildRequires: gcc-objc
BuildRequires: %{gcc}-objc
# Copied from gcc-4.1.2-32.
%ifarch %{ix86} x86_64 ia64 ppc ppc64 s390 alpha
BuildRequires: gcc-ada
BuildRequires: %{gcc}-ada
%endif
%ifarch aarch64
%if 0%{suse_version} >= 1330
BuildRequires: gcc-ada
BuildRequires: %{gcc}-ada
%endif
%endif
%if 0%{!?disable_32bit:1}
@ -301,9 +306,9 @@ BuildRequires: gcc-ada
%if 0%{suse_version} >= 1330
# Older distros miss this pseudo package, the Ada
# testsuite won't work completely
BuildRequires: gcc-ada-32bit
BuildRequires: %{gcc}-ada-32bit
%endif
BuildRequires: gcc-c++-32bit
BuildRequires: %{gcc}-c++-32bit
%if 0%{suse_version} >= 1210 && 0%{suse_version} != 1315
BuildRequires: glibc-devel-static-32bit
%endif
@ -545,10 +550,19 @@ do
mkdir %{gdb_build}$fprofile
cd %{gdb_build}$fprofile
%if 0%{suse_version} > 1110
CC=gcc
CXX=g++
%else
CC=gcc-4.8
CXX=g++-4.8
%endif
export CC
export CXX
export CFLAGS="$RPM_OPT_FLAGS"
# FIXME: gcc-7 compatibility.
if echo "" | gcc -x c -c - -o /dev/null -Wno-implicit-fallthrough >/dev/null 2>&1; then
if echo "" | $CC -x c -c - -o /dev/null -Wno-implicit-fallthrough >/dev/null 2>&1; then
CFLAGS="$CFLAGS -Wno-implicit-fallthrough"
fi
export CXXFLAGS="$CFLAGS"
@ -719,7 +733,21 @@ echo ====================TESTSUITE DISABLED=========================
%else
echo ====================TESTING=========================
cd gdb
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
%if 0%{suse_version} > 1110
CC=gcc
CXX=g++
%else
CC=gcc-4.8
CXX=g++-4.8
mkdir progs
for i in gcc g++ gcj gfortran gnat gnatbind gnatmake; do
test -f /usr/bin/${i}-4.8 && ln -sf /usr/bin/${i}-4.8 progs/$i
done
PATH="`pwd`"/progs:${PATH}
%endif
export CC
export CXX
$CC -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
# Need to use a single --ignore option, second use overrides first.
# No `%{?_smp_mflags}' here as it may race.
# WARNING: can't generate a core file - core tests suppressed - check ulimit
@ -744,7 +772,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
fi
# Do not use $RPM_OPT_FLAGS as the other non-size options will not be used
# in the real run of the testsuite.
if ! gcc $BI -o biarch biarch.c
if ! $CC $BI -o biarch biarch.c
then
continue
fi
@ -753,7 +781,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
# Do not try -m64 inferiors for -m32 GDB as it cannot handle inferiors larger
# than itself.
# s390 -m31 still uses the standard ELF32 binary format.
gcc $RPM_OPT_FLAGS -o biarch biarch.c
$CC $RPM_OPT_FLAGS -o biarch biarch.c
RPM_SIZE="$(file ./biarch|sed -n 's/^.*: ELF \(32\|64\)-bit .*$/\1/p')"
if [ "$RPM_SIZE" != "64" ]
then