C++ Library containing a lot of needful things: Stack Trace, Command Line Parser, Resource Handling, Configuration Files, Unix Command Execution, Directories, Regular Expressions, Tokenizer, Function Trace, Standard Extensions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

demangle.h 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. /* Defs for interface to demanglers.
  2. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
  3. 2003, 2004 Free Software Foundation, Inc.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA. */
  16. #if !defined (DEMANGLE_H)
  17. #define DEMANGLE_H
  18. #include "libiberty.h"
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif /* __cplusplus */
  22. /* Options passed to cplus_demangle (in 2nd parameter). */
  23. #define DMGL_NO_OPTS 0 /* For readability... */
  24. #define DMGL_PARAMS (1 << 0) /* Include function args */
  25. #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
  26. #define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
  27. #define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
  28. #define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
  29. #define DMGL_AUTO (1 << 8)
  30. #define DMGL_GNU (1 << 9)
  31. #define DMGL_LUCID (1 << 10)
  32. #define DMGL_ARM (1 << 11)
  33. #define DMGL_HP (1 << 12) /* For the HP aCC compiler;
  34. same as ARM except for
  35. template arguments, etc. */
  36. #define DMGL_EDG (1 << 13)
  37. #define DMGL_GNU_V3 (1 << 14)
  38. #define DMGL_GNAT (1 << 15)
  39. /* If none of these are set, use 'current_demangling_style' as the default. */
  40. #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
  41. /* Enumeration of possible demangling styles.
  42. Lucid and ARM styles are still kept logically distinct, even though
  43. they now both behave identically. The resulting style is actual the
  44. union of both. I.E. either style recognizes both "__pt__" and "__rf__"
  45. for operator "->", even though the first is lucid style and the second
  46. is ARM style. (FIXME?) */
  47. extern enum demangling_styles
  48. {
  49. no_demangling = -1,
  50. unknown_demangling = 0,
  51. auto_demangling = DMGL_AUTO,
  52. gnu_demangling = DMGL_GNU,
  53. lucid_demangling = DMGL_LUCID,
  54. arm_demangling = DMGL_ARM,
  55. hp_demangling = DMGL_HP,
  56. edg_demangling = DMGL_EDG,
  57. gnu_v3_demangling = DMGL_GNU_V3,
  58. java_demangling = DMGL_JAVA,
  59. gnat_demangling = DMGL_GNAT
  60. } current_demangling_style;
  61. /* Define string names for the various demangling styles. */
  62. #define NO_DEMANGLING_STYLE_STRING "none"
  63. #define AUTO_DEMANGLING_STYLE_STRING "auto"
  64. #define GNU_DEMANGLING_STYLE_STRING "gnu"
  65. #define LUCID_DEMANGLING_STYLE_STRING "lucid"
  66. #define ARM_DEMANGLING_STYLE_STRING "arm"
  67. #define HP_DEMANGLING_STYLE_STRING "hp"
  68. #define EDG_DEMANGLING_STYLE_STRING "edg"
  69. #define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
  70. #define JAVA_DEMANGLING_STYLE_STRING "java"
  71. #define GNAT_DEMANGLING_STYLE_STRING "gnat"
  72. /* Some macros to test what demangling style is active. */
  73. #define CURRENT_DEMANGLING_STYLE current_demangling_style
  74. #define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
  75. #define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
  76. #define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
  77. #define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
  78. #define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
  79. #define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
  80. #define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
  81. #define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
  82. #define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
  83. /* Provide information about the available demangle styles. This code is
  84. pulled from gdb into libiberty because it is useful to binutils also. */
  85. extern const struct demangler_engine
  86. {
  87. const char *const demangling_style_name;
  88. const enum demangling_styles demangling_style;
  89. const char *const demangling_style_doc;
  90. } libiberty_demanglers[];
  91. extern char *
  92. cplus_demangle PARAMS ((const char *mangled, int options));
  93. extern int
  94. cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
  95. extern const char *
  96. cplus_mangle_opname PARAMS ((const char *opname, int options));
  97. /* Note: This sets global state. FIXME if you care about multi-threading. */
  98. extern void
  99. set_cplus_marker_for_demangling PARAMS ((int ch));
  100. extern enum demangling_styles
  101. cplus_demangle_set_style PARAMS ((enum demangling_styles style));
  102. extern enum demangling_styles
  103. cplus_demangle_name_to_style PARAMS ((const char *name));
  104. /* V3 ABI demangling entry points, defined in cp-demangle.c. */
  105. extern char*
  106. cplus_demangle_v3 PARAMS ((const char* mangled, int options));
  107. extern char*
  108. java_demangle_v3 PARAMS ((const char* mangled));
  109. enum gnu_v3_ctor_kinds {
  110. gnu_v3_complete_object_ctor = 1,
  111. gnu_v3_base_object_ctor,
  112. gnu_v3_complete_object_allocating_ctor
  113. };
  114. /* Return non-zero iff NAME is the mangled form of a constructor name
  115. in the G++ V3 ABI demangling style. Specifically, return an `enum
  116. gnu_v3_ctor_kinds' value indicating what kind of constructor
  117. it is. */
  118. extern enum gnu_v3_ctor_kinds
  119. is_gnu_v3_mangled_ctor PARAMS ((const char *name));
  120. enum gnu_v3_dtor_kinds {
  121. gnu_v3_deleting_dtor = 1,
  122. gnu_v3_complete_object_dtor,
  123. gnu_v3_base_object_dtor
  124. };
  125. /* Return non-zero iff NAME is the mangled form of a destructor name
  126. in the G++ V3 ABI demangling style. Specifically, return an `enum
  127. gnu_v3_dtor_kinds' value, indicating what kind of destructor
  128. it is. */
  129. extern enum gnu_v3_dtor_kinds
  130. is_gnu_v3_mangled_dtor PARAMS ((const char *name));
  131. /* The V3 demangler works in two passes. The first pass builds a tree
  132. representation of the mangled name, and the second pass turns the
  133. tree representation into a demangled string. Here we define an
  134. interface to permit a caller to build their own tree
  135. representation, which they can pass to the demangler to get a
  136. demangled string. This can be used to canonicalize user input into
  137. something which the demangler might output. It could also be used
  138. by other demanglers in the future. */
  139. /* These are the component types which may be found in the tree. Many
  140. component types have one or two subtrees, referred to as left and
  141. right (a component type with only one subtree puts it in the left
  142. subtree). */
  143. enum demangle_component_type
  144. {
  145. /* A name, with a length and a pointer to a string. */
  146. DEMANGLE_COMPONENT_NAME,
  147. /* A qualified name. The left subtree is a class or namespace or
  148. some such thing, and the right subtree is a name qualified by
  149. that class. */
  150. DEMANGLE_COMPONENT_QUAL_NAME,
  151. /* A local name. The left subtree describes a function, and the
  152. right subtree is a name which is local to that function. */
  153. DEMANGLE_COMPONENT_LOCAL_NAME,
  154. /* A typed name. The left subtree is a name, and the right subtree
  155. describes that name as a function. */
  156. DEMANGLE_COMPONENT_TYPED_NAME,
  157. /* A template. The left subtree is a template name, and the right
  158. subtree is a template argument list. */
  159. DEMANGLE_COMPONENT_TEMPLATE,
  160. /* A template parameter. This holds a number, which is the template
  161. parameter index. */
  162. DEMANGLE_COMPONENT_TEMPLATE_PARAM,
  163. /* A constructor. This holds a name and the kind of
  164. constructor. */
  165. DEMANGLE_COMPONENT_CTOR,
  166. /* A destructor. This holds a name and the kind of destructor. */
  167. DEMANGLE_COMPONENT_DTOR,
  168. /* A vtable. This has one subtree, the type for which this is a
  169. vtable. */
  170. DEMANGLE_COMPONENT_VTABLE,
  171. /* A VTT structure. This has one subtree, the type for which this
  172. is a VTT. */
  173. DEMANGLE_COMPONENT_VTT,
  174. /* A construction vtable. The left subtree is the type for which
  175. this is a vtable, and the right subtree is the derived type for
  176. which this vtable is built. */
  177. DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
  178. /* A typeinfo structure. This has one subtree, the type for which
  179. this is the tpeinfo structure. */
  180. DEMANGLE_COMPONENT_TYPEINFO,
  181. /* A typeinfo name. This has one subtree, the type for which this
  182. is the typeinfo name. */
  183. DEMANGLE_COMPONENT_TYPEINFO_NAME,
  184. /* A typeinfo function. This has one subtree, the type for which
  185. this is the tpyeinfo function. */
  186. DEMANGLE_COMPONENT_TYPEINFO_FN,
  187. /* A thunk. This has one subtree, the name for which this is a
  188. thunk. */
  189. DEMANGLE_COMPONENT_THUNK,
  190. /* A virtual thunk. This has one subtree, the name for which this
  191. is a virtual thunk. */
  192. DEMANGLE_COMPONENT_VIRTUAL_THUNK,
  193. /* A covariant thunk. This has one subtree, the name for which this
  194. is a covariant thunk. */
  195. DEMANGLE_COMPONENT_COVARIANT_THUNK,
  196. /* A Java class. This has one subtree, the type. */
  197. DEMANGLE_COMPONENT_JAVA_CLASS,
  198. /* A guard variable. This has one subtree, the name for which this
  199. is a guard variable. */
  200. DEMANGLE_COMPONENT_GUARD,
  201. /* A reference temporary. This has one subtree, the name for which
  202. this is a temporary. */
  203. DEMANGLE_COMPONENT_REFTEMP,
  204. /* A standard substitution. This holds the name of the
  205. substitution. */
  206. DEMANGLE_COMPONENT_SUB_STD,
  207. /* The restrict qualifier. The one subtree is the type which is
  208. being qualified. */
  209. DEMANGLE_COMPONENT_RESTRICT,
  210. /* The volatile qualifier. The one subtree is the type which is
  211. being qualified. */
  212. DEMANGLE_COMPONENT_VOLATILE,
  213. /* The const qualifier. The one subtree is the type which is being
  214. qualified. */
  215. DEMANGLE_COMPONENT_CONST,
  216. /* The restrict qualifier modifying a member function. The one
  217. subtree is the type which is being qualified. */
  218. DEMANGLE_COMPONENT_RESTRICT_THIS,
  219. /* The volatile qualifier modifying a member function. The one
  220. subtree is the type which is being qualified. */
  221. DEMANGLE_COMPONENT_VOLATILE_THIS,
  222. /* The const qualifier modifying a member function. The one subtree
  223. is the type which is being qualified. */
  224. DEMANGLE_COMPONENT_CONST_THIS,
  225. /* A vendor qualifier. The left subtree is the type which is being
  226. qualified, and the right subtree is the name of the
  227. qualifier. */
  228. DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
  229. /* A pointer. The one subtree is the type which is being pointed
  230. to. */
  231. DEMANGLE_COMPONENT_POINTER,
  232. /* A reference. The one subtree is the type which is being
  233. referenced. */
  234. DEMANGLE_COMPONENT_REFERENCE,
  235. /* A complex type. The one subtree is the base type. */
  236. DEMANGLE_COMPONENT_COMPLEX,
  237. /* An imaginary type. The one subtree is the base type. */
  238. DEMANGLE_COMPONENT_IMAGINARY,
  239. /* A builtin type. This holds the builtin type information. */
  240. DEMANGLE_COMPONENT_BUILTIN_TYPE,
  241. /* A vendor's builtin type. This holds the name of the type. */
  242. DEMANGLE_COMPONENT_VENDOR_TYPE,
  243. /* A function type. The left subtree is the return type. The right
  244. subtree is a list of ARGLIST nodes. Either or both may be
  245. NULL. */
  246. DEMANGLE_COMPONENT_FUNCTION_TYPE,
  247. /* An array type. The left subtree is the dimension, which may be
  248. NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an
  249. expression. The right subtree is the element type. */
  250. DEMANGLE_COMPONENT_ARRAY_TYPE,
  251. /* A pointer to member type. The left subtree is the class type,
  252. and the right subtree is the member type. CV-qualifiers appear
  253. on the latter. */
  254. DEMANGLE_COMPONENT_PTRMEM_TYPE,
  255. /* An argument list. The left subtree is the current argument, and
  256. the right subtree is either NULL or another ARGLIST node. */
  257. DEMANGLE_COMPONENT_ARGLIST,
  258. /* A template argument list. The left subtree is the current
  259. template argument, and the right subtree is either NULL or
  260. another TEMPLATE_ARGLIST node. */
  261. DEMANGLE_COMPONENT_TEMPLATE_ARGLIST,
  262. /* An operator. This holds information about a standard
  263. operator. */
  264. DEMANGLE_COMPONENT_OPERATOR,
  265. /* An extended operator. This holds the number of arguments, and
  266. the name of the extended operator. */
  267. DEMANGLE_COMPONENT_EXTENDED_OPERATOR,
  268. /* A typecast, represented as a unary operator. The one subtree is
  269. the type to which the argument should be cast. */
  270. DEMANGLE_COMPONENT_CAST,
  271. /* A unary expression. The left subtree is the operator, and the
  272. right subtree is the single argument. */
  273. DEMANGLE_COMPONENT_UNARY,
  274. /* A binary expression. The left subtree is the operator, and the
  275. right subtree is a BINARY_ARGS. */
  276. DEMANGLE_COMPONENT_BINARY,
  277. /* Arguments to a binary expression. The left subtree is the first
  278. argument, and the right subtree is the second argument. */
  279. DEMANGLE_COMPONENT_BINARY_ARGS,
  280. /* A trinary expression. The left subtree is the operator, and the
  281. right subtree is a TRINARY_ARG1. */
  282. DEMANGLE_COMPONENT_TRINARY,
  283. /* Arguments to a trinary expression. The left subtree is the first
  284. argument, and the right subtree is a TRINARY_ARG2. */
  285. DEMANGLE_COMPONENT_TRINARY_ARG1,
  286. /* More arguments to a trinary expression. The left subtree is the
  287. second argument, and the right subtree is the third argument. */
  288. DEMANGLE_COMPONENT_TRINARY_ARG2,
  289. /* A literal. The left subtree is the type, and the right subtree
  290. is the value, represented as a DEMANGLE_COMPONENT_NAME. */
  291. DEMANGLE_COMPONENT_LITERAL,
  292. /* A negative literal. Like LITERAL, but the value is negated.
  293. This is a minor hack: the NAME used for LITERAL points directly
  294. to the mangled string, but since negative numbers are mangled
  295. using 'n' instead of '-', we want a way to indicate a negative
  296. number which involves neither modifying the mangled string nor
  297. allocating a new copy of the literal in memory. */
  298. DEMANGLE_COMPONENT_LITERAL_NEG
  299. };
  300. /* Types which are only used internally. */
  301. struct demangle_operator_info;
  302. struct demangle_builtin_type_info;
  303. /* A node in the tree representation is an instance of a struct
  304. demangle_component. Note that the field names of the struct are
  305. not well protected against macros defined by the file including
  306. this one. We can fix this if it ever becomes a problem. */
  307. struct demangle_component
  308. {
  309. /* The type of this component. */
  310. enum demangle_component_type type;
  311. union
  312. {
  313. /* For DEMANGLE_COMPONENT_NAME. */
  314. struct
  315. {
  316. /* A pointer to the name (which need not NULL terminated) and
  317. its length. */
  318. const char *s;
  319. int len;
  320. } s_name;
  321. /* For DEMANGLE_COMPONENT_OPERATOR. */
  322. struct
  323. {
  324. /* Operator. */
  325. const struct demangle_operator_info *op;
  326. } s_operator;
  327. /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */
  328. struct
  329. {
  330. /* Number of arguments. */
  331. int args;
  332. /* Name. */
  333. struct demangle_component *name;
  334. } s_extended_operator;
  335. /* For DEMANGLE_COMPONENT_CTOR. */
  336. struct
  337. {
  338. /* Kind of constructor. */
  339. enum gnu_v3_ctor_kinds kind;
  340. /* Name. */
  341. struct demangle_component *name;
  342. } s_ctor;
  343. /* For DEMANGLE_COMPONENT_DTOR. */
  344. struct
  345. {
  346. /* Kind of destructor. */
  347. enum gnu_v3_dtor_kinds kind;
  348. /* Name. */
  349. struct demangle_component *name;
  350. } s_dtor;
  351. /* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */
  352. struct
  353. {
  354. /* Builtin type. */
  355. const struct demangle_builtin_type_info *type;
  356. } s_builtin;
  357. /* For DEMANGLE_COMPONENT_SUB_STD. */
  358. struct
  359. {
  360. /* Standard substitution string. */
  361. const char* string;
  362. /* Length of string. */
  363. int len;
  364. } s_string;
  365. /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */
  366. struct
  367. {
  368. /* Template parameter index. */
  369. long number;
  370. } s_number;
  371. /* For other types. */
  372. struct
  373. {
  374. /* Left (or only) subtree. */
  375. struct demangle_component *left;
  376. /* Right subtree. */
  377. struct demangle_component *right;
  378. } s_binary;
  379. } u;
  380. };
  381. /* People building mangled trees are expected to allocate instances of
  382. struct demangle_component themselves. They can then call one of
  383. the following functions to fill them in. */
  384. /* Fill in most component types with a left subtree and a right
  385. subtree. Returns non-zero on success, zero on failure, such as an
  386. unrecognized or inappropriate component type. */
  387. extern int
  388. cplus_demangle_fill_component PARAMS ((struct demangle_component *fill,
  389. enum demangle_component_type,
  390. struct demangle_component *left,
  391. struct demangle_component *right));
  392. /* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
  393. zero for bad arguments. */
  394. extern int
  395. cplus_demangle_fill_name PARAMS ((struct demangle_component *fill,
  396. const char *, int));
  397. /* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
  398. builtin type (e.g., "int", etc.). Returns non-zero on success,
  399. zero if the type is not recognized. */
  400. extern int
  401. cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
  402. const char *type_name));
  403. /* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
  404. operator and the number of arguments which it takes (the latter is
  405. used to disambiguate operators which can be both binary and unary,
  406. such as '-'). Returns non-zero on success, zero if the operator is
  407. not recognized. */
  408. extern int
  409. cplus_demangle_fill_operator PARAMS ((struct demangle_component *fill,
  410. const char *opname, int args));
  411. /* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
  412. number of arguments and the name. Returns non-zero on success,
  413. zero for bad arguments. */
  414. extern int
  415. cplus_demangle_fill_extended_operator PARAMS ((struct demangle_component *fill,
  416. int numargs,
  417. struct demangle_component *nm));
  418. /* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
  419. zero for bad arguments. */
  420. extern int
  421. cplus_demangle_fill_ctor PARAMS ((struct demangle_component *fill,
  422. enum gnu_v3_ctor_kinds kind,
  423. struct demangle_component *name));
  424. /* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
  425. zero for bad arguments. */
  426. extern int
  427. cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill,
  428. enum gnu_v3_dtor_kinds kind,
  429. struct demangle_component *name));
  430. /* This function translates a mangled name into a struct
  431. demangle_component tree. The first argument is the mangled name.
  432. The second argument is DMGL_* options. This returns a pointer to a
  433. tree on success, or NULL on failure. On success, the third
  434. argument is set to a block of memory allocated by malloc. This
  435. block should be passed to free when the tree is no longer
  436. needed. */
  437. extern struct demangle_component *
  438. cplus_demangle_v3_components PARAMS ((const char *mangled,
  439. int options,
  440. void **mem));
  441. /* This function takes a struct demangle_component tree and returns
  442. the corresponding demangled string. The first argument is DMGL_*
  443. options. The second is the tree to demangle. The third is a guess
  444. at the length of the demangled string, used to initially allocate
  445. the return buffer. The fourth is a pointer to a size_t. On
  446. success, this function returns a buffer allocated by malloc(), and
  447. sets the size_t pointed to by the fourth argument to the size of
  448. the allocated buffer (not the length of the returned string). On
  449. failure, this function returns NULL, and sets the size_t pointed to
  450. by the fourth argument to 0 for an invalid tree, or to 1 for a
  451. memory allocation error. */
  452. extern char *
  453. cplus_demangle_print PARAMS ((int options,
  454. const struct demangle_component *tree,
  455. int estimated_length,
  456. size_t *p_allocated_size));
  457. #ifdef __cplusplus
  458. }
  459. #endif /* __cplusplus */
  460. #endif /* DEMANGLE_H */