|
| 1 | +/* This testcase is part of GDB, the GNU debugger. |
| 2 | +
|
| 3 | + Copyright 2004, 2007, 2008, 2009 Free Software Foundation, Inc. |
| 4 | +
|
| 5 | + This program is free software; you can redistribute it and/or modify |
| 6 | + it under the terms of the GNU General Public License as published by |
| 7 | + the Free Software Foundation; either version 3 of the License, or |
| 8 | + (at your option) any later version. |
| 9 | +
|
| 10 | + This program is distributed in the hope that it will be useful, |
| 11 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + GNU General Public License for more details. |
| 14 | +
|
| 15 | + You should have received a copy of the GNU General Public License |
| 16 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 17 | + |
| 18 | +/* Test .debug_aranges containing zero address_size. */ |
| 19 | + |
| 20 | +/* Dummy function to provide debug information for. */ |
| 21 | + |
| 22 | + .text |
| 23 | +.Lbegin_text1: |
| 24 | + .globl main |
| 25 | + .type main, %function |
| 26 | +main: |
| 27 | +.Lbegin_main: |
| 28 | + .int 0 |
| 29 | +.Lend_main: |
| 30 | + .size main, .-main |
| 31 | +.Lend_text1: |
| 32 | + |
| 33 | +/* Debug information */ |
| 34 | + |
| 35 | + .section .debug_info |
| 36 | +.Lcu1_begin: |
| 37 | + /* CU header */ |
| 38 | + .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */ |
| 39 | +.Lcu1_start: |
| 40 | + .2byte 2 /* DWARF Version */ |
| 41 | + .4byte .Labbrev1_begin /* Offset into abbrev section */ |
| 42 | + .byte 4 /* Pointer size */ |
| 43 | + |
| 44 | + /* CU die */ |
| 45 | + .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ |
| 46 | + .4byte .Lend_text1 /* DW_AT_high_pc */ |
| 47 | + .4byte .Lbegin_text1 /* DW_AT_low_pc */ |
| 48 | + .ascii "file1.txt\0" /* DW_AT_name */ |
| 49 | + .ascii "GNU C 3.3.3\0" /* DW_AT_producer */ |
| 50 | + .byte 1 /* DW_AT_language (C) */ |
| 51 | + |
| 52 | + /* main */ |
| 53 | + .uleb128 2 /* Abbrev: DW_TAG_subprogram */ |
| 54 | + .byte 1 /* DW_AT_external */ |
| 55 | + .byte 1 /* DW_AT_decl_file */ |
| 56 | + .byte 2 /* DW_AT_decl_line */ |
| 57 | + .ascii "main\0" /* DW_AT_name */ |
| 58 | + .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */ |
| 59 | + .4byte .Lbegin_main /* DW_AT_low_pc */ |
| 60 | + .4byte .Lend_main /* DW_AT_high_pc */ |
| 61 | + .byte 1 /* DW_AT_frame_base: length */ |
| 62 | + .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */ |
| 63 | + |
| 64 | +.Ltype_int: |
| 65 | + .uleb128 3 /* Abbrev: DW_TAG_base_type */ |
| 66 | + .ascii "int\0" /* DW_AT_name */ |
| 67 | + .byte 4 /* DW_AT_byte_size */ |
| 68 | + .byte 5 /* DW_AT_encoding */ |
| 69 | + |
| 70 | + .byte 0 /* End of children of CU */ |
| 71 | + |
| 72 | +.Lcu1_end: |
| 73 | + |
| 74 | +/* Abbrev table */ |
| 75 | + .section .debug_abbrev |
| 76 | +.Labbrev1_begin: |
| 77 | + .uleb128 1 /* Abbrev code */ |
| 78 | + .uleb128 0x11 /* DW_TAG_compile_unit */ |
| 79 | + .byte 1 /* has_children */ |
| 80 | + .uleb128 0x12 /* DW_AT_high_pc */ |
| 81 | + .uleb128 0x1 /* DW_FORM_addr */ |
| 82 | + .uleb128 0x11 /* DW_AT_low_pc */ |
| 83 | + .uleb128 0x1 /* DW_FORM_addr */ |
| 84 | + .uleb128 0x3 /* DW_AT_name */ |
| 85 | + .uleb128 0x8 /* DW_FORM_string */ |
| 86 | + .uleb128 0x25 /* DW_AT_producer */ |
| 87 | + .uleb128 0x8 /* DW_FORM_string */ |
| 88 | + .uleb128 0x13 /* DW_AT_language */ |
| 89 | + .uleb128 0xb /* DW_FORM_data1 */ |
| 90 | + .byte 0x0 /* Terminator */ |
| 91 | + .byte 0x0 /* Terminator */ |
| 92 | + |
| 93 | + .uleb128 2 /* Abbrev code */ |
| 94 | + .uleb128 0x2e /* DW_TAG_subprogram */ |
| 95 | + .byte 0 /* has_children */ |
| 96 | + .uleb128 0x3f /* DW_AT_external */ |
| 97 | + .uleb128 0xc /* DW_FORM_flag */ |
| 98 | + .uleb128 0x3a /* DW_AT_decl_file */ |
| 99 | + .uleb128 0xb /* DW_FORM_data1 */ |
| 100 | + .uleb128 0x3b /* DW_AT_decl_line */ |
| 101 | + .uleb128 0xb /* DW_FORM_data1 */ |
| 102 | + .uleb128 0x3 /* DW_AT_name */ |
| 103 | + .uleb128 0x8 /* DW_FORM_string */ |
| 104 | + .uleb128 0x49 /* DW_AT_type */ |
| 105 | + .uleb128 0x13 /* DW_FORM_ref4 */ |
| 106 | + .uleb128 0x11 /* DW_AT_low_pc */ |
| 107 | + .uleb128 0x1 /* DW_FORM_addr */ |
| 108 | + .uleb128 0x12 /* DW_AT_high_pc */ |
| 109 | + .uleb128 0x1 /* DW_FORM_addr */ |
| 110 | + .uleb128 0x40 /* DW_AT_frame_base */ |
| 111 | + .uleb128 0xa /* DW_FORM_block1 */ |
| 112 | + .byte 0x0 /* Terminator */ |
| 113 | + .byte 0x0 /* Terminator */ |
| 114 | + |
| 115 | + .uleb128 3 /* Abbrev code */ |
| 116 | + .uleb128 0x24 /* DW_TAG_base_type */ |
| 117 | + .byte 0 /* has_children */ |
| 118 | + .uleb128 0x3 /* DW_AT_name */ |
| 119 | + .uleb128 0x8 /* DW_FORM_string */ |
| 120 | + .uleb128 0xb /* DW_AT_byte_size */ |
| 121 | + .uleb128 0xb /* DW_FORM_data1 */ |
| 122 | + .uleb128 0x3e /* DW_AT_encoding */ |
| 123 | + .uleb128 0xb /* DW_FORM_data1 */ |
| 124 | + .byte 0x0 /* Terminator */ |
| 125 | + .byte 0x0 /* Terminator */ |
| 126 | + |
| 127 | + .byte 0x0 /* Terminator */ |
| 128 | + .byte 0x0 /* Terminator */ |
| 129 | + |
| 130 | +/* aranges table */ |
| 131 | + .section .debug_aranges |
| 132 | + .long .Laranges_end - 1f |
| 133 | +1: |
| 134 | + .2byte 2 /* aranges Version */ |
| 135 | + .4byte .Lcu1_begin - .debug_info /* Offset into .debug_info section */ |
| 136 | + /* The GDB crasher is this zero value. */ |
| 137 | + .byte 0 /* aranges address_size */ |
| 138 | + .byte 0 /* aranges segment_size */ |
| 139 | + |
| 140 | +.Laranges_end: |
0 commit comments