Imported Upstream version 7.9
[platform/upstream/gdb.git] / gdb / testsuite / gdb.dwarf2 / dw2-minsym-in-cu.S
1 /* This testcase is part of GDB, the GNU debugger.
2
3    Copyright 2004-2015 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         .text
19 .Lbegin_text1:
20
21         .globl main
22         .type main, %function
23 main:
24 .Lbegin_main:
25         .int 0
26 .Lend_main:
27         .size main, .-main
28
29         .globl func2
30         .type func2, %function
31 func2:
32         .int 0
33         .size func2, .-func2
34
35 .Lend_text1:
36
37 /* Debug information */
38
39         .section .debug_info
40 .Lcu1_begin:
41         /* CU header */
42         .4byte  .Lcu1_end - .Lcu1_start         /* Length of Compilation Unit */
43 .Lcu1_start:
44         .2byte  2                               /* DWARF Version */
45         .4byte  .Labbrev1_begin                 /* Offset into abbrev section */
46         .byte   4                               /* Pointer size */
47
48         /* CU die */
49         .uleb128 1                              /* Abbrev: DW_TAG_compile_unit */
50         .4byte  .Lend_text1                     /* DW_AT_high_pc */
51         .4byte  .Lbegin_text1                   /* DW_AT_low_pc */
52         .ascii  "file1.txt\0"                   /* DW_AT_name */
53         .ascii  "GNU C 3.3.3\0"                 /* DW_AT_producer */
54         .byte   1                               /* DW_AT_language (C) */
55
56         /* main */
57         .uleb128        2                       /* Abbrev: DW_TAG_subprogram */
58         .byte           1                       /* DW_AT_external */
59         .ascii          "main\0"                /* DW_AT_name */
60         .4byte  .Ldebug_ranges                  /* DW_AT_ranges */
61
62         .byte           0                       /* End of children of CU */
63 .Lcu1_end:
64
65 /* DW_AT_ranges.  */
66         .section        .debug_ranges
67 .Ldebug_ranges:
68         .4byte  .Lbegin_main
69         .4byte  .Lend_main - 1
70         /* Make it slightly more interesting to set pending_addrmap_interesting.  */
71         .4byte  .Lend_main - 1
72         .4byte  .Lend_main
73         .4byte  0
74         .4byte  0
75
76 /* Abbrev table */
77         .section .debug_abbrev
78 .Labbrev1_begin:
79         .uleb128        1                       /* Abbrev code */
80         .uleb128        0x11                    /* DW_TAG_compile_unit */
81         .byte           1                       /* has_children */
82         .uleb128        0x12                    /* DW_AT_high_pc */
83         .uleb128        0x1                     /* DW_FORM_addr */
84         .uleb128        0x11                    /* DW_AT_low_pc */
85         .uleb128        0x1                     /* DW_FORM_addr */
86         .uleb128        0x3                     /* DW_AT_name */
87         .uleb128        0x8                     /* DW_FORM_string */
88         .uleb128        0x25                    /* DW_AT_producer */
89         .uleb128        0x8                     /* DW_FORM_string */
90         .uleb128        0x13                    /* DW_AT_language */
91         .uleb128        0xb                     /* DW_FORM_data1 */
92         .byte           0x0                     /* Terminator */
93         .byte           0x0                     /* Terminator */
94
95         .uleb128        2                       /* Abbrev code */
96         .uleb128        0x2e                    /* DW_TAG_subprogram */
97         .byte           0                       /* has_children */
98         .uleb128        0x3f                    /* DW_AT_external */
99         .uleb128        0xc                     /* DW_FORM_flag */
100         .uleb128        0x3                     /* DW_AT_name */
101         .uleb128        0x8                     /* DW_FORM_string */
102         .uleb128        0x55                    /* DW_AT_ranges */
103         .uleb128        0x6                     /* DW_FORM_data4 */
104         .byte           0x0                     /* Terminator */
105         .byte           0x0                     /* Terminator */
106
107         .byte           0x0                     /* Terminator */
108         .byte           0x0                     /* Terminator */