1 /* This testcase is derived from a similar test in GDB.
3 Copyright 2009 Free Software Foundation, Inc.
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.
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.
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/>. */
18 /* This tests that gdb can read compressed sections. The contents
19 are a basic assembly file, but the .debug_abbrev section has been
20 comrpessed using zlib. */
22 /* Dummy function to provide debug information for. */
25 .section .gnu.linkonce.t.foo,"axG",%progbits,foo,comdat
31 .type func_cu1, %function
36 .size func_cu1, .-func_cu1
39 /* Debug information */
41 .section .debug_info,"G",%progbits,foo,comdat
44 .4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */
46 .2byte 2 /* DWARF Version */
47 .4byte .Labbrev1_begin /* Offset into abbrev section */
48 .byte 4 /* Pointer size */
51 .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
52 .4byte .Lline1_begin /* DW_AT_stmt_list */
53 .4byte .Lend_text1 /* DW_AT_high_pc */
54 .4byte .Lbegin_text1 /* DW_AT_low_pc */
55 .ascii "file1.txt\0" /* DW_AT_name */
56 .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
57 .byte 1 /* DW_AT_language (C) */
60 .uleb128 2 /* Abbrev: DW_TAG_subprogram */
61 .byte 1 /* DW_AT_external */
62 .byte 1 /* DW_AT_decl_file */
63 .byte 2 /* DW_AT_decl_line */
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 */
68 .byte 1 /* DW_AT_frame_base: length */
69 .byte 0x55 /* DW_AT_frame_base: DW_OP_reg5 */
72 .uleb128 3 /* Abbrev: DW_TAG_base_type */
73 .ascii "int\0" /* DW_AT_name */
74 .byte 4 /* DW_AT_byte_size */
75 .byte 5 /* DW_AT_encoding */
77 .byte 0 /* End of children of CU */
82 .section .debug_line,"G",%progbits,foo,comdat
84 .4byte .Lline1_end - .Lline1_start /* Initial length */
86 .2byte 2 /* Version */
87 .4byte .Lline1_lines - .Lline1_hdr /* header_length */
89 .byte 1 /* Minimum insn length */
90 .byte 1 /* default_is_stmt */
91 .byte 1 /* line_base */
92 .byte 1 /* line_range */
93 .byte 0x10 /* opcode_base */
95 /* Standard lengths */
112 /* Include directories */
124 .byte 0 /* DW_LNE_set_address */
127 .4byte .Lbegin_func_cu1
129 .byte 3 /* DW_LNS_advance_line */
130 .sleb128 3 /* ... to 4 */
132 .byte 1 /* DW_LNS_copy */
134 .byte 1 /* DW_LNS_copy (second time as an end-of-prologue marker) */
136 .byte 0 /* DW_LNE_set_address */
139 .4byte .Lend_func_cu1
141 .byte 0 /* DW_LNE_end_of_sequence */
147 /* Abbrev table -- compressed */
148 .section .zdebug_abbrev,"G",%progbits,foo,comdat