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