.
[deliverable/binutils-gdb.git] / gdb / cp-support.h
CommitLineData
de17c821 1/* Helper routines for C++ support in GDB.
38d518c9 2 Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
de17c821
DJ
3
4 Contributed by MontaVista Software.
9219021c 5 Namespace support contributed by David Carlton.
de17c821
DJ
6
7 This file is part of GDB.
8
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.
13
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.
18
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. */
23
9219021c
DC
24#ifndef CP_SUPPORT_H
25#define CP_SUPPORT_H
26
1fcb5155
DC
27/* We need this for 'domain_enum', alas... */
28
29#include "symtab.h"
30
9219021c
DC
31/* Opaque declarations. */
32
b59661bd 33struct symbol;
9219021c
DC
34struct obstack;
35struct block;
4a4b3fed 36struct objfile;
362ff856 37struct type;
9219021c
DC
38
39/* This struct is designed to store data from using directives. It
40 says that names from namespace INNER should be visible within
41 namespace OUTER. OUTER should always be a strict initial substring
42 of INNER. These form a linked list; NEXT is the next element of
43 the list. */
44
45struct using_direct
46{
47 char *inner;
48 char *outer;
49 struct using_direct *next;
50};
51
52
53/* Functions from cp-support.c. */
54
de17c821
DJ
55extern char *class_name_from_physname (const char *physname);
56
57extern char *method_name_from_physname (const char *physname);
9219021c
DC
58
59extern unsigned int cp_find_first_component (const char *name);
60
61extern unsigned int cp_entire_prefix_len (const char *name);
62
b6429628 63extern struct symbol **make_symbol_overload_list (struct symbol *);
9219021c 64
362ff856
MC
65extern struct type *cp_lookup_rtti_type (const char *name,
66 struct block *block);
67
9219021c
DC
68/* Functions/variables from cp-namespace.c. */
69
70extern unsigned char processing_has_namespace_info;
71
38d518c9 72extern const char *processing_current_prefix;
9219021c
DC
73
74extern int cp_is_anonymous (const char *namespace);
75
76extern void cp_add_using_directive (const char *name,
77 unsigned int outer_length,
78 unsigned int inner_length);
79
b9362cc7 80extern void cp_initialize_namespace (void);
9219021c
DC
81
82extern void cp_finalize_namespace (struct block *static_block,
83 struct obstack *obstack);
84
85extern void cp_set_block_scope (const struct symbol *symbol,
86 struct block *block,
87 struct obstack *obstack);
88
89extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol);
90
1fcb5155
DC
91extern struct symbol *cp_lookup_symbol_nonlocal (const char *name,
92 const char *linkage_name,
93 const struct block *block,
94 const domain_enum domain,
95 struct symtab **symtab);
96
97extern struct symbol *cp_lookup_symbol_namespace (const char *namespace,
98 const char *name,
99 const char *linkage_name,
100 const struct block *block,
101 const domain_enum domain,
102 struct symtab **symtab);
103
79c2c32d
DC
104extern struct type *cp_lookup_nested_type (struct type *parent_type,
105 const char *nested_name,
106 const struct block *block);
107
5c4e30ca
DC
108extern void cp_check_possible_namespace_symbols (const char *name,
109 struct objfile *objfile);
110
111/* The list of "maint cplus" commands. */
112
113extern struct cmd_list_element *maint_cplus_cmd_list;
114
9219021c 115#endif /* CP_SUPPORT_H */
This page took 0.135319 seconds and 4 git commands to generate.