Blame SOURCES/gdb-bz601887-dwarf4-rh-test.patch

e1d87d
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S	2014-02-06 22:02:21.981449555 +0100
e1d87d
@@ -0,0 +1,167 @@
e1d87d
+/* This testcase is part of GDB, the GNU debugger.
e1d87d
+
e1d87d
+   Copyright 2010 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+   This program is free software; you can redistribute it and/or modify
e1d87d
+   it under the terms of the GNU General Public License as published by
e1d87d
+   the Free Software Foundation; either version 3 of the License, or
e1d87d
+   (at your option) any later version.
e1d87d
+
e1d87d
+   This program is distributed in the hope that it will be useful,
e1d87d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+   GNU General Public License for more details.
e1d87d
+
e1d87d
+   You should have received a copy of the GNU General Public License
e1d87d
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
e1d87d
+
e1d87d
+	.file	"rh-dwarf4-x86_64.c"
e1d87d
+	.section	.debug_abbrev,"",@progbits
e1d87d
+.Ldebug_abbrev0:
e1d87d
+	.section	.debug_info,"",@progbits
e1d87d
+.Ldebug_info0:
e1d87d
+	.section	.debug_line,"",@progbits
e1d87d
+.Ldebug_line0:
e1d87d
+	.text
e1d87d
+.Ltext0:
e1d87d
+.globl main
e1d87d
+	.type	main, @function
e1d87d
+main:
e1d87d
+.LFB0:
e1d87d
+	.file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c"
e1d87d
+	# gdb.dwarf2/rh-dwarf4-x86_64.c:20
e1d87d
+	.loc 1 20 0
e1d87d
+	.cfi_startproc
e1d87d
+	# basic block 2
e1d87d
+	pushq	%rbp
e1d87d
+	.cfi_def_cfa_offset 16
e1d87d
+	movq	%rsp, %rbp
e1d87d
+	.cfi_offset 6, -16
e1d87d
+	.cfi_def_cfa_register 6
e1d87d
+	# gdb.dwarf2/rh-dwarf4-x86_64.c:21
e1d87d
+	.loc 1 21 0
e1d87d
+	movl	$0, %eax
e1d87d
+	# gdb.dwarf2/rh-dwarf4-x86_64.c:22
e1d87d
+	.loc 1 22 0
e1d87d
+	leave
e1d87d
+	.cfi_def_cfa 7, 8
e1d87d
+	ret
e1d87d
+	.cfi_endproc
e1d87d
+.LFE0:
e1d87d
+	.size	main, .-main
e1d87d
+.Letext0:
e1d87d
+	.section	.debug_info
e1d87d
+	.long	0x4e	# Length of Compilation Unit Info
e1d87d
+	.value	0x4	# DWARF version number
e1d87d
+	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
e1d87d
+	.byte	0x8	# Pointer Size (in bytes)
e1d87d
+	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
e1d87d
+	.long	.LASF0	# DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
e1d87d
+	.byte	0x1	# DW_AT_language
e1d87d
+	.long	.LASF1	# DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c"
e1d87d
+	.long	.LASF2	# DW_AT_comp_dir
e1d87d
+	.quad	.Ltext0	# DW_AT_low_pc
e1d87d
+	.quad	.Letext0	# DW_AT_high_pc
e1d87d
+	.long	.Ldebug_line0	# DW_AT_stmt_list
e1d87d
+	.uleb128 0x2	# (DIE (0x2d) DW_TAG_subprogram)
e1d87d
+			# DW_AT_external
e1d87d
+	.long	.LASF3	# DW_AT_name: "main"
e1d87d
+	.byte	0x1	# DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c)
e1d87d
+	.byte	0x13	# DW_AT_decl_line
e1d87d
+			# DW_AT_prototyped
e1d87d
+	.long	0x4a	# DW_AT_type
e1d87d
+	.quad	.LFB0	# DW_AT_low_pc
e1d87d
+	.quad	.LFE0	# DW_AT_high_pc
e1d87d
+	.uleb128 0x1	# DW_AT_frame_base
e1d87d
+	.byte	0x9c	# DW_OP_call_frame_cfa
e1d87d
+	.uleb128 0x3	# (DIE (0x4a) DW_TAG_base_type)
e1d87d
+	.byte	0x4	# DW_AT_byte_size
e1d87d
+	.byte	0x5	# DW_AT_encoding
e1d87d
+	.ascii "int\0"	# DW_AT_name
e1d87d
+	.byte	0x0	# end of children of DIE 0xb
e1d87d
+	.section	.debug_abbrev
e1d87d
+	.uleb128 0x1	# (abbrev code)
e1d87d
+	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
e1d87d
+	.byte	0x1	# DW_children_yes
e1d87d
+	.uleb128 0x25	# (DW_AT_producer)
e1d87d
+	.uleb128 0xe	# (DW_FORM_strp)
e1d87d
+	.uleb128 0x13	# (DW_AT_language)
e1d87d
+	.uleb128 0xb	# (DW_FORM_data1)
e1d87d
+	.uleb128 0x3	# (DW_AT_name)
e1d87d
+	.uleb128 0xe	# (DW_FORM_strp)
e1d87d
+	.uleb128 0x1b	# (DW_AT_comp_dir)
e1d87d
+	.uleb128 0xe	# (DW_FORM_strp)
e1d87d
+	.uleb128 0x11	# (DW_AT_low_pc)
e1d87d
+	.uleb128 0x1	# (DW_FORM_addr)
e1d87d
+	.uleb128 0x12	# (DW_AT_high_pc)
e1d87d
+	.uleb128 0x1	# (DW_FORM_addr)
e1d87d
+	.uleb128 0x10	# (DW_AT_stmt_list)
e1d87d
+	.uleb128 0x17	# (DW_FORM_sec_offset)
e1d87d
+	.byte	0x0
e1d87d
+	.byte	0x0
e1d87d
+	.uleb128 0x2	# (abbrev code)
e1d87d
+	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
e1d87d
+	.byte	0x0	# DW_children_no
e1d87d
+	.uleb128 0x3f	# (DW_AT_external)
e1d87d
+	.uleb128 0x19	# (DW_FORM_flag_present)
e1d87d
+	.uleb128 0x3	# (DW_AT_name)
e1d87d
+	.uleb128 0xe	# (DW_FORM_strp)
e1d87d
+	.uleb128 0x3a	# (DW_AT_decl_file)
e1d87d
+	.uleb128 0xb	# (DW_FORM_data1)
e1d87d
+	.uleb128 0x3b	# (DW_AT_decl_line)
e1d87d
+	.uleb128 0xb	# (DW_FORM_data1)
e1d87d
+	.uleb128 0x27	# (DW_AT_prototyped)
e1d87d
+	.uleb128 0x19	# (DW_FORM_flag_present)
e1d87d
+	.uleb128 0x49	# (DW_AT_type)
e1d87d
+	.uleb128 0x13	# (DW_FORM_ref4)
e1d87d
+	.uleb128 0x11	# (DW_AT_low_pc)
e1d87d
+	.uleb128 0x1	# (DW_FORM_addr)
e1d87d
+	.uleb128 0x12	# (DW_AT_high_pc)
e1d87d
+	.uleb128 0x1	# (DW_FORM_addr)
e1d87d
+	.uleb128 0x40	# (DW_AT_frame_base)
e1d87d
+	.uleb128 0x18	# (DW_FORM_exprloc)
e1d87d
+	.byte	0x0
e1d87d
+	.byte	0x0
e1d87d
+	.uleb128 0x3	# (abbrev code)
e1d87d
+	.uleb128 0x24	# (TAG: DW_TAG_base_type)
e1d87d
+	.byte	0x0	# DW_children_no
e1d87d
+	.uleb128 0xb	# (DW_AT_byte_size)
e1d87d
+	.uleb128 0xb	# (DW_FORM_data1)
e1d87d
+	.uleb128 0x3e	# (DW_AT_encoding)
e1d87d
+	.uleb128 0xb	# (DW_FORM_data1)
e1d87d
+	.uleb128 0x3	# (DW_AT_name)
e1d87d
+	.uleb128 0x8	# (DW_FORM_string)
e1d87d
+	.byte	0x0
e1d87d
+	.byte	0x0
e1d87d
+	.byte	0x0
e1d87d
+	.section	.debug_pubnames,"",@progbits
e1d87d
+	.long	0x17	# Length of Public Names Info
e1d87d
+	.value	0x2	# DWARF Version
e1d87d
+	.long	.Ldebug_info0	# Offset of Compilation Unit Info
e1d87d
+	.long	0x52	# Compilation Unit Length
e1d87d
+	.long	0x2d	# DIE offset
e1d87d
+	.ascii "main\0"	# external name
e1d87d
+	.long	0x0
e1d87d
+	.section	.debug_aranges,"",@progbits
e1d87d
+	.long	0x2c	# Length of Address Ranges Info
e1d87d
+	.value	0x2	# DWARF Version
e1d87d
+	.long	.Ldebug_info0	# Offset of Compilation Unit Info
e1d87d
+	.byte	0x8	# Size of Address
e1d87d
+	.byte	0x0	# Size of Segment Descriptor
e1d87d
+	.value	0x0	# Pad to 16 byte boundary
e1d87d
+	.value	0x0
e1d87d
+	.quad	.Ltext0	# Address
e1d87d
+	.quad	.Letext0-.Ltext0	# Length
e1d87d
+	.quad	0x0
e1d87d
+	.quad	0x0
e1d87d
+	.section	.debug_str,"MS",@progbits,1
e1d87d
+.LASF2:
e1d87d
+	.string	"."
e1d87d
+.LASF0:
e1d87d
+	.string	"GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
e1d87d
+.LASF1:
e1d87d
+	.string	"gdb.dwarf2/rh-dwarf4-x86_64.c"
e1d87d
+.LASF3:
e1d87d
+	.string	"main"
e1d87d
+	.ident	"GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
e1d87d
+	.section	.note.GNU-stack,"",@progbits
e1d87d
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c	2014-02-06 22:02:21.981449555 +0100
e1d87d
@@ -0,0 +1,22 @@
e1d87d
+/* This testcase is part of GDB, the GNU debugger.
e1d87d
+
e1d87d
+   Copyright 2010 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+   This program is free software; you can redistribute it and/or modify
e1d87d
+   it under the terms of the GNU General Public License as published by
e1d87d
+   the Free Software Foundation; either version 3 of the License, or
e1d87d
+   (at your option) any later version.
e1d87d
+
e1d87d
+   This program is distributed in the hope that it will be useful,
e1d87d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+   GNU General Public License for more details.
e1d87d
+
e1d87d
+   You should have received a copy of the GNU General Public License
e1d87d
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
e1d87d
+
e1d87d
+int
e1d87d
+main (void)
e1d87d
+{
e1d87d
+  return 0;
e1d87d
+}
e1d87d
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp	2014-02-06 22:12:10.788032417 +0100
e1d87d
@@ -0,0 +1,42 @@
e1d87d
+# Copyright 2010 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+# This program is free software; you can redistribute it and/or modify
e1d87d
+# it under the terms of the GNU General Public License as published by
e1d87d
+# the Free Software Foundation; either version 3 of the License, or
e1d87d
+# (at your option) any later version.
e1d87d
+#
e1d87d
+# This program is distributed in the hope that it will be useful,
e1d87d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+# GNU General Public License for more details.
e1d87d
+#
e1d87d
+# You should have received a copy of the GNU General Public License
e1d87d
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
e1d87d
+
e1d87d
+# This test can only be run on targets which support DWARF-2 and use gas.
e1d87d
+# For now pick a sampling of likely targets.
e1d87d
+if {![istarget *-*-linux*]
e1d87d
+    && ![istarget *-*-gnu*]
e1d87d
+    && ![istarget *-*-elf*]
e1d87d
+    && ![istarget *-*-openbsd*]
e1d87d
+    && ![istarget arm-*-eabi*]
e1d87d
+    && ![istarget powerpc-*-eabi*]} {
e1d87d
+    return 0  
e1d87d
+}
e1d87d
+
e1d87d
+if {![istarget x86_64-*]} {
e1d87d
+    return 0  
e1d87d
+}
e1d87d
+
e1d87d
+set testfile "rh-dwarf4-x86_64"
e1d87d
+set srcfile ${testfile}.S
e1d87d
+set executable ${testfile}.x
e1d87d
+set binfile [standard_output_file ${executable}]
e1d87d
+
e1d87d
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+clean_restart $executable
e1d87d
+
e1d87d
+gdb_test "ptype main" {type = int \(void\)}