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

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