1 /* Copyright (C) 2015-2020 Free Software Foundation, Inc.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 /* This tests makes use of the .debug_ranges section, especially,
17 making sure that the base address encoding scheme is used. */
19 /* Dummy function to provide debug information for. */
27 .type func_cu1, %function
32 .size func_cu1, .-func_cu1
37 .type func_cu2, %function
42 .size func_cu2, .-func_cu2
45 /* Debug information */
50 .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
52 .2byte 2 /* DWARF Version */
53 .4byte .Labbrev1_begin /* Offset into abbrev section */
54 .byte 4 /* Pointer size */
57 .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
59 .ascii "file1.c\0" /* DW_AT_name */
60 .byte 1 /* DW_AT_language (C) */
63 .uleb128 2 /* Abbrev: DW_TAG_subprogram */
64 .ascii "func_cu1\0" /* DW_AT_name */
65 .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
66 .4byte .Lbegin_func_cu1 /* DW_AT_low_pc */
67 .4byte .Lend_func_cu1 /* DW_AT_high_pc */
70 .uleb128 2 /* Abbrev: DW_TAG_subprogram */
71 .ascii "func_cu2\0" /* DW_AT_name */
72 .4byte .Ltype_int-.Lcu1_begin /* DW_AT_type */
73 .4byte .Lbegin_func_cu2 /* DW_AT_low_pc */
74 .4byte .Lend_func_cu2 /* DW_AT_high_pc */
77 .uleb128 3 /* Abbrev: DW_TAG_base_type */
78 .ascii "int\0" /* DW_AT_name */
79 .byte 4 /* DW_AT_byte_size */
80 .byte 5 /* DW_AT_encoding */
82 .byte 0 /* End of children of CU */
86 .section .debug_ranges
88 .4byte 0xffffffff /* base address marker */
89 .4byte .Lbegin_text1 /* base address */
90 .4byte 0 /* start offset */
91 .4byte .Lend_text1 - .Lbegin_text1 /* end offset */
92 .4byte 0xffffffff /* base address marker */
93 .4byte .Lbegin_text2 /* base address */
94 .4byte 0 /* start offset */
95 .4byte .Lend_text2 - .Lbegin_text2 /* end offset */
96 .4byte 0 /* End marker (Part 1) */
97 .4byte 0 /* End marker (Part 2) */
99 .section .debug_abbrev
101 .uleb128 1 /* Abbrev code */
102 .uleb128 0x11 /* DW_TAG_compile_unit */
103 .byte 1 /* has_children */
104 .uleb128 0x55 /* DW_AT_ranges */
105 .uleb128 0x17 /* DW_FORM_sec_offset */
106 .uleb128 0x3 /* DW_AT_name */
107 .uleb128 0x8 /* DW_FORM_string */
108 .uleb128 0x13 /* DW_AT_language */
109 .uleb128 0xb /* DW_FORM_data1 */
110 .byte 0x0 /* Terminator */
111 .byte 0x0 /* Terminator */
113 .uleb128 2 /* Abbrev code */
114 .uleb128 0x2e /* DW_TAG_subprogram */
115 .byte 0 /* has_children */
116 .uleb128 0x3 /* DW_AT_name */
117 .uleb128 0x8 /* DW_FORM_string */
118 .uleb128 0x49 /* DW_AT_type */
119 .uleb128 0x13 /* DW_FORM_ref4 */
120 .uleb128 0x11 /* DW_AT_low_pc */
121 .uleb128 0x1 /* DW_FORM_addr */
122 .uleb128 0x12 /* DW_AT_high_pc */
123 .uleb128 0x1 /* DW_FORM_addr */
124 .byte 0x0 /* Terminator */
125 .byte 0x0 /* Terminator */
127 .uleb128 3 /* Abbrev code */
128 .uleb128 0x24 /* DW_TAG_base_type */
129 .byte 0 /* has_children */
130 .uleb128 0x3 /* DW_AT_name */
131 .uleb128 0x8 /* DW_FORM_string */
132 .uleb128 0xb /* DW_AT_byte_size */
133 .uleb128 0xb /* DW_FORM_data1 */
134 .uleb128 0x3e /* DW_AT_encoding */
135 .uleb128 0xb /* DW_FORM_data1 */
136 .byte 0x0 /* Terminator */
137 .byte 0x0 /* Terminator */
139 .byte 0x0 /* Terminator */
140 .byte 0x0 /* Terminator */