1 /* Helper routines for C++ support in GDB.
2 Copyright 2002, 2003 Free Software Foundation, Inc.
4 Contributed by MontaVista Software.
5 Namespace support contributed by David Carlton.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
27 /* We need this for 'domain_enum', alas... */
31 /* Opaque declarations. */
36 /* This struct is designed to store data from using directives. It
37 says that names from namespace INNER should be visible within
38 namespace OUTER. OUTER should always be a strict initial substring
39 of INNER. These form a linked list; NEXT is the next element of
46 struct using_direct
*next
;
50 /* Functions from cp-support.c. */
52 extern char *class_name_from_physname (const char *physname
);
54 extern char *method_name_from_physname (const char *physname
);
56 extern unsigned int cp_find_first_component (const char *name
);
58 extern unsigned int cp_entire_prefix_len (const char *name
);
61 /* Functions/variables from cp-namespace.c. */
63 extern unsigned char processing_has_namespace_info
;
65 extern const char *processing_current_namespace
;
67 extern int cp_is_anonymous (const char *namespace);
69 extern void cp_add_using_directive (const char *name
,
70 unsigned int outer_length
,
71 unsigned int inner_length
);
73 extern void cp_initialize_namespace ();
75 extern void cp_finalize_namespace (struct block
*static_block
,
76 struct obstack
*obstack
);
78 extern void cp_set_block_scope (const struct symbol
*symbol
,
80 struct obstack
*obstack
);
82 extern void cp_scan_for_anonymous_namespaces (const struct symbol
*symbol
);
84 extern struct symbol
*cp_lookup_symbol_nonlocal (const char *name
,
85 const char *linkage_name
,
86 const struct block
*block
,
87 const domain_enum domain
,
88 struct symtab
**symtab
);
90 extern struct symbol
*cp_lookup_symbol_namespace (const char *namespace,
92 const char *linkage_name
,
93 const struct block
*block
,
94 const domain_enum domain
,
95 struct symtab
**symtab
);
97 #endif /* CP_SUPPORT_H */