1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2009, 2010, 2011 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 G++ 4.1 producing DW_TAG_namespace with DW_AT_name "::".  */
19
20	.data
21var:	.4byte	1
22
23	.section .debug_info
24.Lcu1_begin:
25	/* CU header */
26	.4byte	.Lcu1_end - .Lcu1_start		/* Length of Compilation Unit */
27.Lcu1_start:
28	.2byte	2				/* DWARF Version */
29	.4byte	.Labbrev1_begin			/* Offset into abbrev section */
30	.byte	4				/* Pointer size */
31
32	/* CU die */
33	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
34	.ascii	"file1.txt\0"			/* DW_AT_name */
35	.ascii	"GNU C 3.3.3\0"			/* DW_AT_producer */
36	.byte	4				/* DW_LANG_C_plus_plus (C++) */
37
38.Ltype_int:
39	.uleb128	2			/* Abbrev: DW_TAG_base_type */
40	.ascii		"int\0"			/* DW_AT_name */
41	.byte		4			/* DW_AT_byte_size */
42	.byte		5			/* DW_AT_encoding */
43
44	.uleb128	3			/* Abbrev: DW_TAG_namespace */
45	.ascii		"::\0"			/* DW_AT_name */
46
47	.uleb128	7			/* Abbrev: DW_TAG_variable (location) */
48	.ascii		"var\0"			/* DW_AT_name */
49	.byte		2f - 1f			/* DW_AT_location */
501:	.byte		3			/*   DW_OP_addr */
51	.4byte		var			/*   <addr> */
522:	.4byte		.Ltype_int-.Lcu1_begin	/* DW_AT_type */
53
54	.byte		0			/* End of children of DW_TAG_namespace */
55
56	.byte		0			/* End of children of CU */
57
58.Lcu1_end:
59
60/* Abbrev table */
61	.section .debug_abbrev
62.Labbrev1_begin:
63	.uleb128	1			/* Abbrev code */
64	.uleb128	0x11			/* DW_TAG_compile_unit */
65	.byte		1			/* has_children */
66	.uleb128	0x3			/* DW_AT_name */
67	.uleb128	0x8			/* DW_FORM_string */
68	.uleb128	0x25			/* DW_AT_producer */
69	.uleb128	0x8			/* DW_FORM_string */
70	.uleb128	0x13			/* DW_AT_language */
71	.uleb128	0xb			/* DW_FORM_data1 */
72	.byte		0x0			/* Terminator */
73	.byte		0x0			/* Terminator */
74
75	.uleb128	2			/* Abbrev code */
76	.uleb128	0x24			/* DW_TAG_base_type */
77	.byte		0			/* has_children */
78	.uleb128	0x3			/* DW_AT_name */
79	.uleb128	0x8			/* DW_FORM_string */
80	.uleb128	0xb			/* DW_AT_byte_size */
81	.uleb128	0xb			/* DW_FORM_data1 */
82	.uleb128	0x3e			/* DW_AT_encoding */
83	.uleb128	0xb			/* DW_FORM_data1 */
84	.byte		0x0			/* Terminator */
85	.byte		0x0			/* Terminator */
86
87	.uleb128	3			/* Abbrev code */
88	.uleb128	0x39			/* DW_TAG_namespace */
89	.byte		1			/* has_children */
90	.uleb128	0x3			/* DW_AT_name */
91	.uleb128	0x8			/* DW_FORM_string */
92	.byte		0x0			/* Terminator */
93	.byte		0x0			/* Terminator */
94
95	.uleb128	7			/* Abbrev code (location) */
96	.uleb128	0x34			/* DW_TAG_variable */
97	.byte		0			/* has_children */
98	.uleb128	0x3			/* DW_AT_name */
99	.uleb128	0x8			/* DW_FORM_string */
100	.uleb128	0x2			/* DW_AT_location */
101	.uleb128	0xa			/* DW_FORM_block1 */
102	.uleb128	0x49			/* DW_AT_type */
103	.uleb128	0x13			/* DW_FORM_ref4 */
104	.byte		0x0			/* Terminator */
105	.byte		0x0			/* Terminator */
106
107	.byte		0x0			/* Terminator */
108	.byte		0x0			/* Terminator */
109