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

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