104 #if defined(_AIX) && !defined(__GNUC__)
121 #if defined(__GNUC__) || defined(__TINYC__)
122 #define alloca __builtin_alloca
131 #define INT_MAX (int)(((unsigned int)~0) >> 1)
145 #define CP_STATIC_IF_GLIBCPP_V3 static
147 #define cplus_demangle_fill_name d_fill_name
150 #define cplus_demangle_fill_extended_operator d_fill_extended_operator
155 #define cplus_demangle_fill_ctor d_fill_ctor
160 #define cplus_demangle_fill_dtor d_fill_dtor
165 #define cplus_demangle_mangled_name d_mangled_name
168 #define cplus_demangle_type d_type
171 #define cplus_demangle_print d_print
174 #define cplus_demangle_print_callback d_print_callback
178 #define cplus_demangle_init_info d_init_info
179 static void d_init_info(
const char *,
int,
size_t,
struct d_info *);
182 #define CP_STATIC_IF_GLIBCPP_V3
188 #define CP_DYNAMIC_ARRAYS
191 #ifdef __STDC_VERSION__
192 #if __STDC_VERSION__ >= 199901L
193 #define CP_DYNAMIC_ARRAYS
208 #define IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
209 #define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z')
210 #define IS_LOWER(c) ((c) >= 'a' && (c) <= 'z')
214 #define ANONYMOUS_NAMESPACE_PREFIX "_GLOBAL_"
215 #define ANONYMOUS_NAMESPACE_PREFIX_LEN \
216 (sizeof(ANONYMOUS_NAMESPACE_PREFIX) - 1)
242 #define d_left(dc) ((dc)->u.s_binary.left)
243 #define d_right(dc) ((dc)->u.s_binary.right)
313 #define MAX_RECURSION_COUNT 1024
365 #ifdef CP_DEMANGLE_DEBUG
503 const char *,
size_t);
520 const char *,
size_t);
558 static char *
d_demangle(
const char *,
int,
size_t *);
560 #define FNQUAL_COMPONENT_CASE \
561 case DEMANGLE_COMPONENT_RESTRICT_THIS: \
562 case DEMANGLE_COMPONENT_VOLATILE_THIS: \
563 case DEMANGLE_COMPONENT_CONST_THIS: \
564 case DEMANGLE_COMPONENT_REFERENCE_THIS: \
565 case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS: \
566 case DEMANGLE_COMPONENT_TRANSACTION_SAFE: \
567 case DEMANGLE_COMPONENT_NOEXCEPT: \
568 case DEMANGLE_COMPONENT_THROW_SPEC
584 #ifdef CP_DEMANGLE_DEBUG
592 printf(
"failed demangling\n");
596 for (
i = 0;
i < indent;
i++)
606 d_dump(dc->
u.
s_binary.right, indent + 2);
612 printf(
"template parameter object\n");
619 d_dump(dc->
u.
s_ctor.name, indent + 2);
623 d_dump(dc->
u.
s_dtor.name, indent + 2);
635 printf(
"extended operator with %d args\n",
641 printf(
"qualified name\n");
659 printf(
"construction vtable\n");
665 printf(
"typeinfo name\n");
668 printf(
"typeinfo function\n");
674 printf(
"virtual thunk\n");
677 printf(
"covariant thunk\n");
686 printf(
"reference temporary\n");
692 printf(
"transaction clone\n");
695 printf(
"non-transaction clone\n");
707 printf(
"restrict this\n");
710 printf(
"volatile this\n");
716 printf(
"reference this\n");
719 printf(
"rvalue reference this\n");
722 printf(
"transaction_safe this\n");
725 printf(
"vendor type qualifier\n");
734 printf(
"rvalue reference\n");
746 printf(
"function type\n");
752 printf(
"pointer to member type\n");
755 printf(
"fixed-point type, accum? %d, sat? %d\n",
757 d_dump(dc->
u.
s_fixed.length, indent + 2);
760 printf(
"argument list\n");
763 printf(
"template argument list\n");
766 printf(
"initializer list\n");
772 printf(
"conversion operator\n");
775 printf(
"nullary operator\n");
778 printf(
"unary operator\n");
781 printf(
"binary operator\n");
784 printf(
"binary operator arguments\n");
787 printf(
"trinary operator\n");
790 printf(
"trinary operator arguments 1\n");
793 printf(
"trinary operator arguments 1\n");
799 printf(
"negative literal\n");
802 printf(
"java resource\n");
805 printf(
"compound name\n");
817 printf(
"pack expansion\n");
820 printf(
"tls init function\n");
823 printf(
"tls wrapper function\n");
835 d_dump(
d_left(dc), indent + 2);
836 d_dump(
d_right(dc), indent + 2);
850 p->u.s_name.len =
len;
863 p->u.s_extended_operator.args =
args;
864 p->u.s_extended_operator.name =
name;
878 p->u.s_ctor.kind =
kind;
879 p->u.s_ctor.name =
name;
893 p->u.s_dtor.kind =
kind;
894 p->u.s_dtor.name =
name;
1011 p->u.s_binary.left =
left;
1012 p->u.s_binary.right =
right;
1051 p->u.s_builtin.type =
type;
1065 p->u.s_operator.op =
op;
1089 p->u.s_unary_num.num =
num;
1090 p->u.s_unary_num.sub =
sub;
1130 p->u.s_number.number =
i;
1144 p->u.s_number.number =
i;
1158 p->u.s_string.string =
name;
1159 p->u.s_string.len =
len;
1251 if (peek ==
'G' || peek ==
'T')
1274 if (peek !=
'\0' && peek !=
'E') {
1466 if (peek2 ==
'T' || peek2 ==
't')
1472 }
else if (
IS_DIGIT(peek) ||
IS_LOWER(peek) || peek ==
'C' || peek ==
'U' || peek ==
'L')
1474 else if (peek ==
'S')
1476 else if (peek ==
'I') {
1481 }
else if (peek ==
'T')
1483 else if (peek ==
'E')
1485 else if (peek ==
'M') {
1534 }
else if (peek ==
'C' || peek ==
'D')
1536 else if (peek ==
'L') {
1544 }
else if (peek ==
'U') {
1601 if (ret > ((
INT_MAX - (peek -
'0')) / 10))
1603 ret = ret * 10 + peek -
'0';
1647 if ((*
s ==
'.' || *
s ==
'_' || *
s ==
'$') &&
s[1] ==
'N') {
1650 sizeof "(anonymous namespace)" - 1);
1663 #define NL(s) s, (sizeof s) - 1
1667 {
"aN",
NL(
"&="), 2 },
1668 {
"aS",
NL(
"="), 2 },
1669 {
"aa",
NL(
"&&"), 2 },
1670 {
"ad",
NL(
"&"), 1 },
1671 {
"an",
NL(
"&"), 2 },
1672 {
"at",
NL(
"alignof "), 1 },
1673 {
"az",
NL(
"alignof "), 1 },
1674 {
"cc",
NL(
"const_cast"), 2 },
1675 {
"cl",
NL(
"()"), 2 },
1676 {
"cm",
NL(
","), 2 },
1677 {
"co",
NL(
"~"), 1 },
1678 {
"dV",
NL(
"/="), 2 },
1679 {
"da",
NL(
"delete[] "), 1 },
1680 {
"dc",
NL(
"dynamic_cast"), 2 },
1681 {
"de",
NL(
"*"), 1 },
1682 {
"dl",
NL(
"delete "), 1 },
1683 {
"ds",
NL(
".*"), 2 },
1684 {
"dt",
NL(
"."), 2 },
1685 {
"dv",
NL(
"/"), 2 },
1686 {
"eO",
NL(
"^="), 2 },
1687 {
"eo",
NL(
"^"), 2 },
1688 {
"eq",
NL(
"=="), 2 },
1689 {
"fL",
NL(
"..."), 3 },
1690 {
"fR",
NL(
"..."), 3 },
1691 {
"fl",
NL(
"..."), 2 },
1692 {
"fr",
NL(
"..."), 2 },
1693 {
"ge",
NL(
">="), 2 },
1694 {
"gs",
NL(
"::"), 1 },
1695 {
"gt",
NL(
">"), 2 },
1696 {
"ix",
NL(
"[]"), 2 },
1697 {
"lS",
NL(
"<<="), 2 },
1698 {
"le",
NL(
"<="), 2 },
1699 {
"li",
NL(
"operator\"\" "), 1 },
1700 {
"ls",
NL(
"<<"), 2 },
1701 {
"lt",
NL(
"<"), 2 },
1702 {
"mI",
NL(
"-="), 2 },
1703 {
"mL",
NL(
"*="), 2 },
1704 {
"mi",
NL(
"-"), 2 },
1705 {
"ml",
NL(
"*"), 2 },
1706 {
"mm",
NL(
"--"), 1 },
1707 {
"na",
NL(
"new[]"), 3 },
1708 {
"ne",
NL(
"!="), 2 },
1709 {
"ng",
NL(
"-"), 1 },
1710 {
"nt",
NL(
"!"), 1 },
1711 {
"nw",
NL(
"new"), 3 },
1712 {
"oR",
NL(
"|="), 2 },
1713 {
"oo",
NL(
"||"), 2 },
1714 {
"or",
NL(
"|"), 2 },
1715 {
"pL",
NL(
"+="), 2 },
1716 {
"pl",
NL(
"+"), 2 },
1717 {
"pm",
NL(
"->*"), 2 },
1718 {
"pp",
NL(
"++"), 1 },
1719 {
"ps",
NL(
"+"), 1 },
1720 {
"pt",
NL(
"->"), 2 },
1721 {
"qu",
NL(
"?"), 3 },
1722 {
"rM",
NL(
"%="), 2 },
1723 {
"rS",
NL(
">>="), 2 },
1724 {
"rc",
NL(
"reinterpret_cast"), 2 },
1725 {
"rm",
NL(
"%"), 2 },
1726 {
"rs",
NL(
">>"), 2 },
1727 {
"sP",
NL(
"sizeof..."), 1 },
1728 {
"sZ",
NL(
"sizeof..."), 1 },
1729 {
"sc",
NL(
"static_cast"), 2 },
1730 {
"st",
NL(
"sizeof "), 1 },
1731 {
"sz",
NL(
"sizeof "), 1 },
1732 {
"tr",
NL(
"throw"), 0 },
1733 {
"tw",
NL(
"throw "), 1 },
1746 else if (
c1 ==
'c' &&
c2 ==
'v') {
1770 i = low + (high - low) / 2;
1773 if (
c1 ==
p->code[0] &&
c2 ==
p->code[1])
1776 if (c1 < p->
code[0] || (
c1 ==
p->code[0] && c2 < p->
code[1]))
1792 p->u.s_character.character =
c;
1949 base_type, derived_type);
2036 else if (
c ==
'v') {
2142 if (peek ==
'r' || peek ==
'V' || peek ==
'K')
2146 if (peek ==
'x' || peek ==
'o' || peek ==
'O' || peek ==
'w')
2523 ret->
u.
s_fixed.sat = (peek ==
's');
2574 }
else if (peek ==
'V') {
2579 }
else if (peek ==
'K') {
2588 di->
expansion +=
sizeof "transaction_safe";
2589 }
else if (peek ==
'o' || peek ==
'O') {
2599 }
else if (peek ==
'w') {
2619 if (!member_fn && peek ==
'F') {
2620 while (pstart != pret) {
2621 switch ((*pstart)->type) {
2634 pstart = &
d_left(*pstart);
2650 if (peek ==
'R' || peek ==
'O') {
2701 if (peek ==
'\0' || peek ==
'E' || peek ==
'.')
2748 if (return_type ==
NULL)
3025 const char *
code =
op->u.s_operator.op->
code;
3026 return (
code[1] ==
'c' && (
code[0] ==
's' ||
code[0] ==
'd' ||
code[0] ==
'c' ||
code[0] ==
'r'));
3047 else if (peek ==
'T')
3076 if (index ==
INT_MAX || index == -1)
3120 if (strcmp(
code,
"st") == 0)
3129 args =
op->u.s_operator.op->args;
3132 args =
op->u.s_extended_operator.args;
3153 else if (
code && !strcmp(
code,
"sP"))
3173 else if (
code[0] ==
'f')
3178 if (!strcmp(
code,
"cl"))
3180 else if (!strcmp(
code,
"dt") || !strcmp(
code,
"pt")) {
3200 else if (!strcmp(
code,
"qu")) {
3207 }
else if (
code[0] ==
'f') {
3214 }
else if (
code[0] ==
'n') {
3216 if (
code[1] !=
'w' &&
code[1] !=
'a')
3341 name =
d_make_name(di,
"string literal",
sizeof "string literal" - 1);
3388 int discrim, num_underscores = 1;
3401 if (num_underscores > 1 && discrim >= 10) {
3482 const char *pend =
suffix;
3485 if (*pend ==
'.' && (
IS_LOWER(pend[1]) || pend[1] ==
'_')) {
3487 while (
IS_LOWER(*pend) || *pend ==
'_')
3490 while (*pend ==
'.' &&
IS_DIGIT(pend[1])) {
3536 {
'a',
NL(
"std::allocator"),
3537 NL(
"std::allocator"),
3539 {
'b',
NL(
"std::basic_string"),
3540 NL(
"std::basic_string"),
3541 NL(
"basic_string") },
3542 {
's',
NL(
"std::string"),
3543 NL(
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >"),
3544 NL(
"basic_string") },
3545 {
'i',
NL(
"std::istream"),
3546 NL(
"std::basic_istream<char, std::char_traits<char> >"),
3547 NL(
"basic_istream") },
3548 {
'o',
NL(
"std::ostream"),
3549 NL(
"std::basic_ostream<char, std::char_traits<char> >"),
3550 NL(
"basic_ostream") },
3551 {
'd',
NL(
"std::iostream"),
3552 NL(
"std::basic_iostream<char, std::char_traits<char> >"),
3553 NL(
"basic_iostream") }
3570 unsigned int new_id;
3573 new_id =
id * 36 +
c -
'0';
3575 new_id =
id * 36 +
c -
'A' + 10;
3587 if (
id >= (
unsigned int)di->
next_sub)
3601 if (peek ==
'C' || peek ==
'D')
3612 if (
p->set_last_name !=
NULL)
3614 p->set_last_name_len);
3616 s =
p->full_expansion;
3619 s =
p->simple_expansion;
3620 len =
p->simple_len;
3641 checkpoint->
n = di->
n;
3649 di->
n = checkpoint->
n;
3681 newalc = dgs->
alc > 0 ? dgs->
alc : 2;
3682 while (newalc < need)
3686 if (newbuf ==
NULL) {
3702 const char *
s,
size_t l) {
3705 need = dgs->
len + l + 1;
3706 if (need > dgs->
alc)
3713 dgs->
buf[dgs->
len + l] =
'\0';
3753 goto recurse_left_right;
3759 goto recurse_left_right;
3915 dpi->
buf[dpi->
len] =
'\0';
3925 if (dpi->
len ==
sizeof(dpi->
buf) - 1)
3936 for (
i = 0;
i < l;
i++)
3975 #ifdef CP_DYNAMIC_ARRAYS
3979 ? dpi.num_saved_scopes
3982 ? dpi.num_copy_templates
3985 dpi.saved_scopes = scopes;
3986 dpi.copy_templates = temps;
3988 dpi.saved_scopes =
alloca(dpi.num_saved_scopes * sizeof(*dpi.saved_scopes));
3989 dpi.copy_templates =
alloca(dpi.num_copy_templates * sizeof(*dpi.copy_templates));
4011 int estimate, size_t *palc) {
4193 dst->template_decl =
src->template_decl;
4225 const char *fold_code =
d_left(dc)->u.s_operator.op->code;
4226 if (fold_code[0] !=
'f')
4242 switch (fold_code[1]) {
4291 int need_template_restore = 0;
4349 while (typed_name !=
NULL) {
4350 if (
i >=
sizeof adpm /
sizeof adpm[0]) {
4357 adpm[
i].
mod = typed_name;
4365 typed_name =
d_left(typed_name);
4368 if (typed_name ==
NULL) {
4378 typed_name =
d_right(typed_name);
4381 if (typed_name ==
NULL) {
4386 if (
i >=
sizeof adpm /
sizeof adpm[0]) {
4391 adpm[
i] = adpm[
i - 1];
4392 adpm[
i].
next = &adpm[
i - 1];
4395 adpm[
i - 1].
mod = typed_name;
4400 typed_name =
d_left(typed_name);
4421 if (!adpm[
i].printed) {
4646 if (scope ==
NULL) {
4656 int found_self_or_parent = 0;
4664 found_self_or_parent = 1;
4669 if (!found_self_or_parent) {
4672 need_template_restore = 1;
4681 if (need_template_restore)
4725 if (need_template_restore)
4803 adpm[0].
next = hold_modifiers;
4810 pdpm = hold_modifiers;
4813 if (
i >=
sizeof adpm /
sizeof adpm[0]) {
4887 unsigned long int flush_count;
4890 if (dpi->
len >=
sizeof(dpi->
buf) - 2)
4924 if (
op->name[
len - 1] ==
' ')
4951 if (!strcmp(
code,
"ad")) {
4972 }
else if (
code && !strcmp(
code,
"sP")) {
4988 else if (
code && !strcmp(
code,
"st"))
5036 if (strcmp(
d_left(dc)->
u.s_operator.op->code,
"ix") == 0) {
5041 if (strcmp(
d_left(dc)->
u.s_operator.op->code,
"cl") != 0)
5069 if (!strcmp(
op->u.s_operator.op->
code,
"qu")) {
5101 tp =
d_left(dc)->u.s_builtin.type->print;
5138 switch (
d_right(dc)->
u.s_name.s[0]) {
5208 for (
i = 0;
i <
len; ++
i) {
5305 if (
end -
p > 3 &&
p[0] ==
'_' &&
p[1] ==
'_' &&
p[2] ==
'U') {
5310 for (q =
p + 3; q <
end; ++q) {
5315 else if (*q >=
'A' && *q <=
'F')
5316 dig = *q -
'A' + 10;
5317 else if (*q >=
'a' && *q <=
'f')
5318 dig = *q -
'a' + 10;
5326 if (q <
end && *q ==
'_' &&
c < 256) {
5415 switch (
mod->type) {
5511 for (
p = mods;
p !=
NULL;
p =
p->next) {
5515 switch (
p->mod->type) {
5584 for (
p = mods;
p !=
NULL;
p =
p->next) {
5725 if (mangled[0] ==
'_' && mangled[1] ==
'Z')
5727 else if (strncmp(mangled,
"_GLOBAL_", 8) == 0 && (mangled[8] ==
'.' || mangled[8] ==
'_' || mangled[8] ==
'$') && (mangled[9] ==
'D' || mangled[9] ==
'I') && mangled[10] ==
'_')
5728 type = mangled[9] ==
'I' ? DCT_GLOBAL_CTORS : DCT_GLOBAL_DTORS;
5738 #ifdef CP_DYNAMIC_ARRAYS
5745 di.comps =
alloca(di.num_comps *
sizeof(*di.comps));
5746 di.subs =
alloca(di.num_subs *
sizeof(*di.subs));
5756 case DCT_GLOBAL_CTORS:
5757 case DCT_GLOBAL_DTORS:
5760 (
type == DCT_GLOBAL_CTORS
5778 #ifdef CP_DEMANGLE_DEBUG
5816 #if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
5818 extern char *__cxa_demangle(
const char *,
char *,
size_t *,
int *);
5847 __cxa_demangle(
const char *mangled_name,
char *output_buffer,
5852 if (mangled_name ==
NULL) {
5866 if (demangled ==
NULL) {
5876 if (output_buffer ==
NULL) {
5880 if (strlen(demangled) < *
length) {
5881 strcpy(output_buffer, demangled);
5883 demangled = output_buffer;
5885 free(output_buffer);
5896 extern int __gcclibcxx_demangle_callback(
const char *,
5897 void (*)(
const char *,
size_t,
void *),
5919 int __gcclibcxx_demangle_callback(
const char *mangled_name,
5920 void (*callback)(
const char *,
size_t,
void *),
5924 if (mangled_name ==
NULL || callback ==
NULL)
5975 #ifndef IN_GLIBCPP_V3
5995 #ifdef CP_DYNAMIC_ARRAYS
6002 di.comps =
alloca(di.num_comps *
sizeof(*di.comps));
6003 di.subs =
alloca(di.num_subs *
sizeof(*di.subs));
6012 while (dc !=
NULL) {
6032 *ctor_kind = dc->
u.
s_ctor.kind;
6037 *dtor_kind = dc->
u.
s_dtor.kind;
6076 #ifdef STANDALONE_DEMANGLER
6079 #include "dyn-string.h"
6081 static void print_usage(
FILE *fp,
int exit_value);
6083 #define IS_ALPHA(CHAR) \
6084 (((CHAR) >= 'a' && (CHAR) <= 'z') || ((CHAR) >= 'A' && (CHAR) <= 'Z'))
6087 #define is_mangled_char(CHAR) \
6088 (IS_ALPHA(CHAR) || IS_DIGIT(CHAR) || (CHAR) == '_' || (CHAR) == '.' || (CHAR) == '$')
6091 const char *program_name;
6096 print_usage(
FILE *fp,
int exit_value) {
6097 fprintf(fp,
"Usage: %s [options] [names ...]\n", program_name);
6098 fprintf(fp,
"Options:\n");
6099 fprintf(fp,
" -h,--help Display this message.\n");
6100 fprintf(fp,
" -p,--no-params Don't display function parameters\n");
6101 fprintf(fp,
" -v,--verbose Produce verbose demanglings.\n");
6102 fprintf(fp,
"If names are provided, they are demangled. Otherwise filters standard input.\n");
6108 static const struct option long_options[] = {
6126 program_name =
argv[0];
6133 print_usage(stderr, 1);
6137 print_usage(stdout, 0);
6148 }
while (opt_char != -1);
6153 dyn_string_t mangled = dyn_string_new(3);
6157 while (!feof(stdin)) {
6163 while (!feof(stdin) && is_mangled_char(
c)) {
6164 dyn_string_append_char(mangled,
c);
6170 if (dyn_string_length(mangled) > 0) {
6171 #ifdef IN_GLIBCPP_V3
6172 s = __cxa_demangle(dyn_string_buf(mangled),
NULL,
NULL,
NULL);
6183 fputs(dyn_string_buf(mangled), stdout);
6186 dyn_string_clear(mangled);
6195 dyn_string_delete(mangled);
6202 #ifdef IN_GLIBCPP_V3
6207 #ifdef IN_GLIBCPP_V3
6218 #ifdef IN_GLIBCPP_V3
6219 fprintf(stderr,
"Failed: %s (status %d)\n",
argv[
i],
status);
6221 fprintf(stderr,
"Failed: %s\n",
argv[
i]);
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c1
lsl lsr asr ror lsl lsr asr ror lsl lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror lsl lsr asr ror c2
CP_STATIC_IF_GLIBCPP_V3 int cplus_demangle_print_callback(int options, struct demangle_component *dc, demangle_callbackref callback, void *opaque)
char * java_demangle_v3(const char *mangled)
static void d_growable_string_callback_adapter(const char *, size_t, void *)
static struct demangle_component * d_make_character(struct d_info *di, int c)
static void d_growable_string_append_buffer(struct d_growable_string *, const char *, size_t)
static int next_is_type_qual(struct d_info *di)
static struct demangle_component * d_make_sub(struct d_info *, const char *, int)
static void d_print_subexpr(struct d_print_info *dpi, int options, struct demangle_component *dc)
static struct demangle_component * d_make_name(struct d_info *, const char *, int)
static void d_save_scope(struct d_print_info *dpi, const struct demangle_component *container)
static int d_compact_number(struct d_info *di)
static struct demangle_component * d_make_comp(struct d_info *, enum demangle_component_type, struct demangle_component *, struct demangle_component *)
char * cplus_demangle_v3(const char *mangled, int options)
static void d_append_char(struct d_print_info *, char)
int cplus_demangle_v3_callback(const char *mangled, int options, demangle_callbackref callback, void *opaque)
static int d_demangle_callback(const char *, int, demangle_callbackref, void *)
static int op_is_new_cast(struct demangle_component *op)
#define ANONYMOUS_NAMESPACE_PREFIX_LEN
static struct demangle_component * d_class_enum_type(struct d_info *)
static struct demangle_component * d_unqualified_name(struct d_info *)
static int is_fnqual_component_type(enum demangle_component_type type)
static void d_print_array_type(struct d_print_info *, int, struct demangle_component *, struct d_print_mod *)
static void d_print_mod(struct d_print_info *, int, struct demangle_component *)
static struct demangle_component * d_unnamed_type(struct d_info *)
static struct demangle_component * d_make_builtin_type(struct d_info *, const struct demangle_builtin_type_info *)
static void d_print_flush(struct d_print_info *)
static struct demangle_component * d_name(struct d_info *)
static void d_print_comp_inner(struct d_print_info *dpi, int options, struct demangle_component *dc)
static int d_pack_length(const struct demangle_component *dc)
CP_STATIC_IF_GLIBCPP_V3 const struct demangle_operator_info cplus_demangle_operators[]
static int d_discriminator(struct d_info *)
#define CP_STATIC_IF_GLIBCPP_V3
static void d_append_buffer(struct d_print_info *, const char *, size_t)
static struct demangle_component * d_encoding(struct d_info *, int)
static int d_args_length(struct d_print_info *dpi, const struct demangle_component *dc)
static void d_print_function_type(struct d_print_info *, int, struct demangle_component *, struct d_print_mod *)
static struct demangle_component * d_special_name(struct d_info *)
CP_STATIC_IF_GLIBCPP_V3 struct demangle_component * cplus_demangle_type(struct d_info *di)
static struct demangle_component * d_identifier(struct d_info *, int)
static struct demangle_component * d_operator_name(struct d_info *)
static int d_add_substitution(struct d_info *, struct demangle_component *)
enum gnu_v3_dtor_kinds is_gnu_v3_mangled_dtor(const char *name)
static void d_print_java_identifier(struct d_print_info *, const char *, int)
static struct demangle_component * d_template_arg(struct d_info *)
static int is_ctor_or_dtor(const char *mangled, enum gnu_v3_ctor_kinds *ctor_kind, enum gnu_v3_dtor_kinds *dtor_kind)
static struct d_saved_scope * d_get_saved_scope(struct d_print_info *dpi, const struct demangle_component *container)
static struct demangle_component * d_make_operator(struct d_info *, const struct demangle_operator_info *)
static struct demangle_component * d_ctor_dtor_name(struct d_info *)
CP_STATIC_IF_GLIBCPP_V3 struct demangle_component * cplus_demangle_mangled_name(struct d_info *di, int top_level)
CP_STATIC_IF_GLIBCPP_V3 int cplus_demangle_fill_ctor(struct demangle_component *p, enum gnu_v3_ctor_kinds kind, struct demangle_component *name)
static int d_maybe_print_fold_expression(struct d_print_info *dpi, int options, struct demangle_component *dc)
static struct demangle_component * d_template_param(struct d_info *)
static int d_number(struct d_info *)
static void d_print_mod_list(struct d_print_info *, int, struct d_print_mod *, int)
static void d_print_comp(struct d_print_info *, int, struct demangle_component *)
static struct demangle_component * d_index_template_argument(struct demangle_component *args, int i)
static struct demangle_component ** d_cv_qualifiers(struct d_info *, struct demangle_component **, int)
static void d_checkpoint(struct d_info *, struct d_info_checkpoint *)
static char * d_demangle(const char *, int, size_t *)
static struct demangle_component * d_function_type(struct d_info *)
CP_STATIC_IF_GLIBCPP_V3 int cplus_demangle_fill_extended_operator(struct demangle_component *p, int args, struct demangle_component *name)
static int d_call_offset(struct d_info *, int)
static struct demangle_component * d_parmlist(struct d_info *)
static void d_growable_string_resize(struct d_growable_string *, size_t)
#define FNQUAL_COMPONENT_CASE
static void d_print_error(struct d_print_info *)
static struct demangle_component * d_make_default_arg(struct d_info *di, int num, struct demangle_component *sub)
static struct demangle_component * d_java_resource(struct d_info *di)
static struct demangle_component * d_nested_name(struct d_info *)
static struct demangle_component * d_vector_type(struct d_info *)
static int has_return_type(struct demangle_component *)
static struct demangle_component * d_array_type(struct d_info *)
static void d_print_init(struct d_print_info *, demangle_callbackref, void *, const struct demangle_component *)
static struct demangle_component * d_lookup_template_argument(struct d_print_info *dpi, const struct demangle_component *dc)
static void d_backtrack(struct d_info *, struct d_info_checkpoint *)
static void d_growable_string_init(struct d_growable_string *, size_t)
static struct demangle_component * d_make_template_param(struct d_info *, int)
static struct demangle_component * d_bare_function_type(struct d_info *, int)
static const struct d_standard_sub_info standard_subs[]
static void d_print_conversion(struct d_print_info *, int, struct demangle_component *)
static struct demangle_component * d_expression_1(struct d_info *di)
static struct demangle_component * d_substitution(struct d_info *, int)
static struct demangle_component * d_make_ctor(struct d_info *, enum gnu_v3_ctor_kinds, struct demangle_component *)
static struct demangle_component * d_local_name(struct d_info *)
static struct demangle_component * d_source_name(struct d_info *)
static struct demangle_component * d_expression(struct d_info *)
static struct demangle_component * d_abi_tags(struct d_info *di, struct demangle_component *dc)
static struct demangle_component * d_lambda(struct d_info *)
#define MAX_RECURSION_COUNT
static char d_last_char(struct d_print_info *)
static struct demangle_component * d_make_extended_operator(struct d_info *, int, struct demangle_component *)
static struct demangle_component * d_make_function_param(struct d_info *di, int i)
static void d_print_cast(struct d_print_info *, int, struct demangle_component *)
static struct demangle_component * d_make_demangle_mangled_name(struct d_info *, const char *)
static int d_print_saw_error(struct d_print_info *)
static struct demangle_component * d_prefix(struct d_info *)
static struct demangle_component * d_make_dtor(struct d_info *, enum gnu_v3_dtor_kinds, struct demangle_component *)
enum gnu_v3_ctor_kinds is_gnu_v3_mangled_ctor(const char *name)
#define ANONYMOUS_NAMESPACE_PREFIX
CP_STATIC_IF_GLIBCPP_V3 const struct demangle_builtin_type_info cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT]
static struct demangle_component * d_exprlist(struct d_info *di, char terminator)
static struct demangle_component * d_ref_qualifier(struct d_info *, struct demangle_component *)
static struct demangle_component * d_expr_primary(struct d_info *)
int java_demangle_v3_callback(const char *mangled, demangle_callbackref callback, void *opaque)
static struct demangle_component * d_find_pack(struct d_print_info *dpi, const struct demangle_component *dc)
CP_STATIC_IF_GLIBCPP_V3 int cplus_demangle_fill_name(struct demangle_component *p, const char *s, int len)
static struct demangle_component * d_template_args_1(struct d_info *)
static struct demangle_component * d_clone_suffix(struct d_info *, struct demangle_component *)
CP_STATIC_IF_GLIBCPP_V3 int cplus_demangle_fill_dtor(struct demangle_component *p, enum gnu_v3_dtor_kinds kind, struct demangle_component *name)
static struct demangle_component * d_template_args(struct d_info *)
static int is_ctor_dtor_or_conversion(struct demangle_component *)
static void d_print_expr_op(struct d_print_info *, int, struct demangle_component *)
static void d_append_num(struct d_print_info *dpi, int l)
static struct demangle_component * d_number_component(struct d_info *di)
CP_STATIC_IF_GLIBCPP_V3 void cplus_demangle_init_info(const char *mangled, int options, size_t len, struct d_info *di)
static void d_count_templates_scopes(int *num_templates, int *num_scopes, const struct demangle_component *dc)
static void d_append_string(struct d_print_info *, const char *)
static struct demangle_component * d_pointer_to_member_type(struct d_info *)
static struct demangle_component * d_make_empty(struct d_info *)
CP_STATIC_IF_GLIBCPP_V3 char * cplus_demangle_print(int options, struct demangle_component *dc, int estimate, size_t *palc)
#define d_check_char(di, c)
#define d_peek_next_char(di)
@ D_PRINT_UNSIGNED_LONG_LONG
#define D_BUILTIN_TYPE_COUNT
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
static static fork const void static count static fd link
@ gnu_v3_complete_object_ctor
@ gnu_v3_complete_object_allocating_ctor
@ gnu_v3_object_ctor_group
@ gnu_v3_base_object_ctor
@ gnu_v3_object_dtor_group
@ gnu_v3_base_object_dtor
@ gnu_v3_complete_object_dtor
@ DEMANGLE_COMPONENT_UNNAMED_TYPE
@ DEMANGLE_COMPONENT_CTOR
@ DEMANGLE_COMPONENT_TLS_WRAPPER
@ DEMANGLE_COMPONENT_CONST
@ DEMANGLE_COMPONENT_VIRTUAL_THUNK
@ DEMANGLE_COMPONENT_TRINARY_ARG1
@ DEMANGLE_COMPONENT_REFERENCE_THIS
@ DEMANGLE_COMPONENT_TRANSACTION_CLONE
@ DEMANGLE_COMPONENT_LITERAL
@ DEMANGLE_COMPONENT_DTOR
@ DEMANGLE_COMPONENT_ARGLIST
@ DEMANGLE_COMPONENT_RESTRICT_THIS
@ DEMANGLE_COMPONENT_CONVERSION
@ DEMANGLE_COMPONENT_TRINARY
@ DEMANGLE_COMPONENT_EXTENDED_OPERATOR
@ DEMANGLE_COMPONENT_PACK_EXPANSION
@ DEMANGLE_COMPONENT_REFERENCE
@ DEMANGLE_COMPONENT_TPARM_OBJ
@ DEMANGLE_COMPONENT_TEMPLATE_PARAM
@ DEMANGLE_COMPONENT_SUB_STD
@ DEMANGLE_COMPONENT_COMPLEX
@ DEMANGLE_COMPONENT_TYPEINFO_FN
@ DEMANGLE_COMPONENT_NONTRANSACTION_CLONE
@ DEMANGLE_COMPONENT_NAME
@ DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE
@ DEMANGLE_COMPONENT_QUAL_NAME
@ DEMANGLE_COMPONENT_REFTEMP
@ DEMANGLE_COMPONENT_TRANSACTION_SAFE
@ DEMANGLE_COMPONENT_BUILTIN_TYPE
@ DEMANGLE_COMPONENT_NULLARY
@ DEMANGLE_COMPONENT_POINTER
@ DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS
@ DEMANGLE_COMPONENT_DEFAULT_ARG
@ DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS
@ DEMANGLE_COMPONENT_INITIALIZER_LIST
@ DEMANGLE_COMPONENT_TAGGED_NAME
@ DEMANGLE_COMPONENT_PTRMEM_TYPE
@ DEMANGLE_COMPONENT_HIDDEN_ALIAS
@ DEMANGLE_COMPONENT_LOCAL_NAME
@ DEMANGLE_COMPONENT_NUMBER
@ DEMANGLE_COMPONENT_FUNCTION_TYPE
@ DEMANGLE_COMPONENT_VENDOR_TYPE
@ DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL
@ DEMANGLE_COMPONENT_TEMPLATE_ARGLIST
@ DEMANGLE_COMPONENT_RESTRICT
@ DEMANGLE_COMPONENT_THROW_SPEC
@ DEMANGLE_COMPONENT_LITERAL_NEG
@ DEMANGLE_COMPONENT_VOLATILE_THIS
@ DEMANGLE_COMPONENT_TRINARY_ARG2
@ DEMANGLE_COMPONENT_CAST
@ DEMANGLE_COMPONENT_JAVA_CLASS
@ DEMANGLE_COMPONENT_RVALUE_REFERENCE
@ DEMANGLE_COMPONENT_GUARD
@ DEMANGLE_COMPONENT_ARRAY_TYPE
@ DEMANGLE_COMPONENT_BINARY_ARGS
@ DEMANGLE_COMPONENT_LAMBDA
@ DEMANGLE_COMPONENT_TLS_INIT
@ DEMANGLE_COMPONENT_COVARIANT_THUNK
@ DEMANGLE_COMPONENT_THUNK
@ DEMANGLE_COMPONENT_CONST_THIS
@ DEMANGLE_COMPONENT_NOEXCEPT
@ DEMANGLE_COMPONENT_DECLTYPE
@ DEMANGLE_COMPONENT_UNARY
@ DEMANGLE_COMPONENT_VECTOR_TYPE
@ DEMANGLE_COMPONENT_COMPOUND_NAME
@ DEMANGLE_COMPONENT_VOLATILE
@ DEMANGLE_COMPONENT_TYPED_NAME
@ DEMANGLE_COMPONENT_CHARACTER
@ DEMANGLE_COMPONENT_OPERATOR
@ DEMANGLE_COMPONENT_TYPEINFO_NAME
@ DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS
@ DEMANGLE_COMPONENT_CLONE
@ DEMANGLE_COMPONENT_IMAGINARY
@ DEMANGLE_COMPONENT_JAVA_RESOURCE
@ DEMANGLE_COMPONENT_TEMPLATE
@ DEMANGLE_COMPONENT_VTABLE
@ DEMANGLE_COMPONENT_TYPEINFO
@ DEMANGLE_COMPONENT_FUNCTION_PARAM
@ DEMANGLE_COMPONENT_FIXED_TYPE
@ DEMANGLE_COMPONENT_BINARY
void(* demangle_callbackref)(const char *, size_t, void *)
unsigned char suffix[65536]
unsigned short prefix[65536]
RZ_API void Ht_() free(HtName_(Ht) *ht)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static void list(RzEgg *egg)
void * realloc(void *ptr, size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
static static fork const void static count static fd const char const char static newpath char char argv
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
static const char struct stat static buf struct stat static buf static vhangup int options
static const char struct stat static buf struct stat static buf static vhangup int status
int main(int argc, char **argv)
const struct d_component_stack * parent
const struct demangle_component * dc
struct demangle_component ** subs
struct demangle_component * last_name
struct demangle_component * comps
struct d_print_template * copy_templates
struct d_saved_scope * saved_scopes
char buf[D_PRINT_BUFFER_LENGTH]
const struct demangle_component * current_template
unsigned long int flush_count
struct d_print_template * templates
struct d_print_mod * modifiers
demangle_callbackref callback
const struct d_component_stack * component_stack
struct d_print_template * templates
struct demangle_component * mod
struct d_print_mod * next
struct d_print_template * next
const struct demangle_component * template_decl
struct d_print_template * templates
const struct demangle_component * container
const char * simple_expansion
const char * full_expansion
const char * set_last_name
struct demangle_component::@376::@384 s_string
struct demangle_component::@376::@385 s_number
struct demangle_component * right
union demangle_component::@376 u
struct demangle_component::@376::@377 s_name
struct demangle_component::@376::@381 s_ctor
struct demangle_component::@376::@378 s_operator
enum gnu_v3_ctor_kinds kind
struct demangle_component::@376::@387 s_binary
struct demangle_component::@376::@382 s_dtor
struct demangle_component::@376::@379 s_extended_operator
struct demangle_component * sub
enum demangle_component_type type
struct demangle_component::@376::@383 s_builtin
struct demangle_component::@376::@388 s_unary_num
struct demangle_component::@376::@380 s_fixed
struct demangle_component * left
struct demangle_component::@376::@386 s_character