Lines Matching full:info
299 struct pr_handle info;
301 info.f = f;
302 info.indent = 0;
303 info.stack = NULL;
304 info.parameter = 0;
305 info.filename = NULL;
306 info.abfd = abfd;
307 info.syms = syms;
308 info.demangler = (char * (*)(struct bfd *, const char *, int)) demangler;
318 return as_tags ? debug_write (dhandle, &tg_fns, (void *) & info)
319 : debug_write (dhandle, &pr_fns, (void *) & info);
326 indent (struct pr_handle *info)
330 for (i = 0; i < info->indent; i++)
331 putc (' ', info->f);
337 push_type (struct pr_handle *info, const char *type)
350 n->next = info->stack;
351 info->stack = n;
359 prepend_type (struct pr_handle *info, const char *s)
363 assert (info->stack != NULL);
365 n = (char *) xmalloc (strlen (s) + strlen (info->stack->type) + 1);
366 sprintf (n, "%s%s", s, info->stack->type);
367 free (info->stack->type);
368 info->stack->type = n;
376 append_type (struct pr_handle *info, const char *s)
383 assert (info->stack != NULL);
385 len = strlen (info->stack->type);
386 info->stack->type = (char *) xrealloc (info->stack->type,
388 strcpy (info->stack->type + len, s);
396 append_parent (struct pr_handle *info, const char *s)
403 assert (info->stack != NULL);
405 len = info->stack->parents ? strlen (info->stack->parents) : 0;
406 info->stack->parents = (char *) xrealloc (info->stack->parents,
408 strcpy (info->stack->parents + len, s);
418 substitute_type (struct pr_handle *info, const char *s)
422 assert (info->stack != NULL);
424 u = strchr (info->stack->type, '|');
429 n = (char *) xmalloc (strlen (info->stack->type) + strlen (s));
431 memcpy (n, info->stack->type, u - info->stack->type);
432 strcpy (n + (u - info->stack->type), s);
435 free (info->stack->type);
436 info->stack->type = n;
442 && (strchr (info->stack->type, '{') != NULL
443 || strchr (info->stack->type, '(') != NULL))
445 if (! prepend_type (info, "(")
446 || ! append_type (info, ")"))
453 return (append_type (info, " ")
454 && append_type (info, s));
460 indent_type (struct pr_handle *info)
464 for (i = 0; i < info->indent; i++)
466 if (! append_type (info, " "))
476 pop_type (struct pr_handle *info)
481 assert (info->stack != NULL);
483 o = info->stack;
484 info->stack = o->next;
539 struct pr_handle *info = (struct pr_handle *) p;
541 assert (info->indent == 0);
543 fprintf (info->f, "%s:\n", filename);
553 struct pr_handle *info = (struct pr_handle *) p;
555 assert (info->indent == 0);
557 fprintf (info->f, " %s:\n", filename);
567 struct pr_handle *info = (struct pr_handle *) p;
569 return push_type (info, "<undefined>");
577 struct pr_handle *info = (struct pr_handle *) p;
579 return push_type (info, "void");
587 struct pr_handle *info = (struct pr_handle *) p;
591 return push_type (info, ab);
599 struct pr_handle *info = (struct pr_handle *) p;
603 return push_type (info, "float");
605 return push_type (info, "double");
608 return push_type (info, ab);
616 struct pr_handle *info = (struct pr_handle *) p;
621 return prepend_type (info, "complex ");
629 struct pr_handle *info = (struct pr_handle *) p;
634 return push_type (info, ab);
643 struct pr_handle *info = (struct pr_handle *) p;
647 if (! push_type (info, "enum "))
651 if (! append_type (info, tag)
652 || ! append_type (info, " "))
655 if (! append_type (info, "{ "))
660 if (! append_type (info, "/* undefined */"))
670 if (! append_type (info, ", "))
674 if (! append_type (info, names[i]))
682 if (! append_type (info, " = ")
683 || ! append_type (info, ab))
692 return append_type (info, " }");
700 struct pr_handle *info = (struct pr_handle *) p;
703 assert (info->stack != NULL);
705 s = strchr (info->stack->type, '|');
707 return substitute_type (info, "(*|)");
708 return substitute_type (info, "*|");
716 struct pr_handle *info = (struct pr_handle *) p;
721 assert (info->stack != NULL);
737 if (! substitute_type (info, ""))
742 arg_types[i] = pop_type (info);
783 if (! substitute_type (info, s))
796 struct pr_handle *info = (struct pr_handle *) p;
798 assert (info->stack != NULL);
800 return substitute_type (info, "&|");
808 struct pr_handle *info = (struct pr_handle *) p;
811 assert (info->stack != NULL);
813 if (! substitute_type (info, ""))
819 return (prepend_type (info, "range (")
820 && append_type (info, "):")
821 && append_type (info, abl)
822 && append_type (info, ":")
823 && append_type (info, abu));
832 struct pr_handle *info = (struct pr_handle *) p;
836 range_type = pop_type (info);
857 if (! substitute_type (info, ab))
862 if (! append_type (info, ":")
863 || ! append_type (info, range_type))
869 if (! append_type (info, " /* string */"))
881 struct pr_handle *info = (struct pr_handle *) p;
883 if (! substitute_type (info, ""))
886 if (! prepend_type (info, "set { ")
887 || ! append_type (info, " }"))
892 if (! append_type (info, "/* bitstring */"))
904 struct pr_handle *info = (struct pr_handle *) p;
907 if (! substitute_type (info, ""))
910 t = pop_type (info);
914 return (substitute_type (info, "")
915 && prepend_type (info, " ")
916 && prepend_type (info, t)
917 && append_type (info, "::|"));
925 struct pr_handle *info = (struct pr_handle *) p;
937 if (! substitute_type (info, ""))
939 domain_type = pop_type (info);
964 if (! substitute_type (info, ""))
969 arg_types[i] = pop_type (info);
1014 if (! substitute_type (info, s))
1027 struct pr_handle *info = (struct pr_handle *) p;
1029 return substitute_type (info, "const |");
1037 struct pr_handle *info = (struct pr_handle *) p;
1039 return substitute_type (info, "volatile |");
1048 struct pr_handle *info = (struct pr_handle *) p;
1050 info->indent += 2;
1052 if (! push_type (info, structp ? "struct " : "union "))
1056 if (! append_type (info, tag))
1064 if (! append_type (info, idbuf))
1068 if (! append_type (info, " {"))
1074 if (! append_type (info, " /*"))
1080 if (! append_type (info, ab))
1086 if (! append_type (info, ab))
1089 if (! append_type (info, " */"))
1092 if (! append_type (info, "\n"))
1095 info->stack->visibility = DEBUG_VISIBILITY_PUBLIC;
1097 return indent_type (info);
1103 pr_fix_visibility (struct pr_handle *info, enum debug_visibility visibility)
1109 assert (info->stack != NULL);
1111 if (info->stack->visibility == visibility)
1136 t = info->stack->type;
1141 if (! append_type (info, s)
1142 || ! append_type (info, ":\n")
1143 || ! indent_type (info))
1146 info->stack->visibility = visibility;
1157 struct pr_handle *info = (struct pr_handle *) p;
1161 if (! substitute_type (info, name))
1164 if (! append_type (info, "; /* "))
1170 if (! append_type (info, "bitsize ")
1171 || ! append_type (info, ab)
1172 || ! append_type (info, ", "))
1177 if (! append_type (info, "bitpos ")
1178 || ! append_type (info, ab)
1179 || ! append_type (info, " */\n")
1180 || ! indent_type (info))
1183 t = pop_type (info);
1187 if (! pr_fix_visibility (info, visibility))
1190 return append_type (info, t);
1198 struct pr_handle *info = (struct pr_handle *) p;
1201 assert (info->stack != NULL);
1202 assert (info->indent >= 2);
1204 info->indent -= 2;
1207 s = info->stack->type + strlen (info->stack->type) - 2;
1223 struct pr_handle *info = (struct pr_handle *) p;
1226 info->indent += 2;
1230 tv = pop_type (info);
1235 if (! push_type (info, structp ? "class " : "union class "))
1239 if (! append_type (info, tag))
1247 if (! append_type (info, idbuf))
1251 if (! append_type (info, " {"))
1255 if (! append_type (info, " /*"))
1263 if (! append_type (info, " size ")
1264 || ! append_type (info, ab))
1270 if (! append_type (info, " vtable "))
1274 if (! append_type (info, "self "))
1279 if (! append_type (info, tv)
1280 || ! append_type (info, " "))
1290 if (! append_type (info, ab))
1294 if (! append_type (info, " */"))
1298 info->stack->visibility = DEBUG_VISIBILITY_PRIVATE;
1300 return (append_type (info, "\n")
1301 && indent_type (info));
1310 struct pr_handle *info = (struct pr_handle *) p;
1313 if (! substitute_type (info, name))
1316 if (! prepend_type (info, "static ")
1317 || ! append_type (info, "; /* ")
1318 || ! append_type (info, physname)
1319 || ! append_type (info, " */\n")
1320 || ! indent_type (info))
1323 t = pop_type (info);
1327 if (! pr_fix_visibility (info, visibility))
1330 return append_type (info, t);
1339 struct pr_handle *info = (struct pr_handle *) p;
1345 assert (info->stack != NULL && info->stack->next != NULL);
1347 if (! substitute_type (info, ""))
1350 t = pop_type (info);
1359 if (! push_type (info, t))
1364 if (! prepend_type (info, "virtual "))
1384 if (! prepend_type (info, prefix))
1390 if (! append_type (info, " /* bitpos ")
1391 || ! append_type (info, ab)
1392 || ! append_type (info, " */"))
1400 s = strchr (info->stack->next->type, '{');
1406 for (l = info->stack->next->type; l != s; l++)
1409 if (! prepend_type (info, l == s ? " : " : ", "))
1412 t = pop_type (info);
1416 n = (char *) xmalloc (strlen (info->stack->type) + strlen (t) + 1);
1417 memcpy (n, info->stack->type, s - info->stack->type);
1418 strcpy (n + (s - info->stack->type), t);
1421 free (info->stack->type);
1422 info->stack->type = n;
1434 struct pr_handle *info = (struct pr_handle *) p;
1436 assert (info->stack != NULL);
1437 info->stack->method = name;
1449 struct pr_handle *info = (struct pr_handle *) p;
1453 assert (info->stack != NULL);
1454 assert (info->stack->next != NULL);
1459 if (! append_type (info, " volatile"))
1464 if (! append_type (info, " const"))
1469 if (! substitute_type (info,
1471 ? info->stack->next->next->method
1472 : info->stack->next->method)))
1476 method_type = pop_type (info);
1485 context_type = pop_type (info);
1492 if (! pr_fix_visibility (info, visibility))
1495 if (! append_type (info, method_type)
1496 || ! append_type (info, " /* ")
1497 || ! append_type (info, physname)
1498 || ! append_type (info, " "))
1506 if (! append_type (info, "context ")
1507 || ! append_type (info, context_type)
1508 || ! append_type (info, " "))
1512 if (! append_type (info, "voffset ")
1513 || ! append_type (info, ab))
1517 return (append_type (info, " */;\n")
1518 && indent_type (info));
1528 struct pr_handle *info = (struct pr_handle *) p;
1531 assert (info->stack != NULL);
1532 assert (info->stack->next != NULL);
1533 assert (info->stack->next->method != NULL);
1538 if (! append_type (info, " volatile"))
1543 if (! append_type (info, " const"))
1548 if (! prepend_type (info, "static "))
1552 if (! substitute_type (info, info->stack->next->method))
1556 method_type = pop_type (info);
1562 if (! pr_fix_visibility (info, visibility))
1565 return (append_type (info, method_type)
1566 && append_type (info, " /* ")
1567 && append_type (info, physname)
1568 && append_type (info, " */;\n")
1569 && indent_type (info));
1577 struct pr_handle *info = (struct pr_handle *) p;
1579 info->stack->method = NULL;
1596 struct pr_handle *info = (struct pr_handle *) p;
1598 return push_type (info, name);
1607 struct pr_handle *info = (struct pr_handle *) p;
1633 if (! push_type (info, t))
1643 if (! append_type (info, tag))
1648 if (! append_type (info, idbuf))
1660 struct pr_handle *info = (struct pr_handle *) p;
1663 if (! substitute_type (info, name))
1666 s = pop_type (info);
1670 indent (info);
1671 fprintf (info->f, "typedef %s;\n", s);
1684 struct pr_handle *info = (struct pr_handle *) p;
1687 t = pop_type (info);
1691 indent (info);
1692 fprintf (info->f, "%s;\n", t);
1704 struct pr_handle *info = (struct pr_handle *) p;
1707 indent (info);
1709 fprintf (info->f, "const int %s = %s;\n", name, ab);
1718 struct pr_handle *info = (struct pr_handle *) p;
1720 indent (info);
1721 fprintf (info->f, "const double %s = %g;\n", name, val);
1730 struct pr_handle *info = (struct pr_handle *) p;
1734 t = pop_type (info);
1738 indent (info);
1740 fprintf (info->f, "const %s %s = %s;\n", t, name, ab);
1753 struct pr_handle *info = (struct pr_handle *) p;
1757 if (! substitute_type (info, name))
1760 t = pop_type (info);
1764 indent (info);
1769 fprintf (info->f, "static ");
1772 fprintf (info->f, "register ");
1778 fprintf (info->f, "%s /* %s */;\n", t, ab);
1790 struct pr_handle *info = (struct pr_handle *) p;
1793 if (! substitute_type (info, name))
1796 t = pop_type (info);
1800 indent (info);
1802 fprintf (info->f, "static ");
1803 fprintf (info->f, "%s (", t);
1805 info->parameter = 1;
1816 struct pr_handle *info = (struct pr_handle *) p;
1827 if (! substitute_type (info, name))
1830 t = pop_type (info);
1834 if (info->parameter != 1)
1835 fprintf (info->f, ", ");
1838 fprintf (info->f, "register ");
1841 fprintf (info->f, "%s /* %s */", t, ab);
1845 ++info->parameter;
1855 struct pr_handle *info = (struct pr_handle *) p;
1858 if (info->parameter > 0)
1860 fprintf (info->f, ")\n");
1861 info->parameter = 0;
1864 indent (info);
1866 fprintf (info->f, "{ /* %s */\n", ab);
1868 info->indent += 2;
1878 struct pr_handle *info = (struct pr_handle *) p;
1881 indent (info);
1883 fprintf (info->f, "/* file %s line %lu addr %s */\n", filename, lineno, ab);
1893 struct pr_handle *info = (struct pr_handle *) p;
1896 info->indent -= 2;
1898 indent (info);
1900 fprintf (info->f, "} /* %s */\n", ab);
1969 struct pr_handle *info = (struct pr_handle *) p;
1971 free (info->filename);
1973 info->filename = strdup (fname);
1983 struct pr_handle *info = (struct pr_handle *) p;
1985 free (info->filename);
1987 info->filename = strdup (fname);
1998 struct pr_handle *info = (struct pr_handle *) p;
2009 fprintf (info->f, "%s\t%s\t0;\"\tkind:e\ttype:%s\n", tag,
2010 info->filename, info->stack->type);
2018 fprintf (info->f, "%s\t%s\t0;\"\tkind:g\tenum:%s\tvalue:%s\n",
2019 names[i], info->filename, name, ab);
2033 struct pr_handle *info = (struct pr_handle *) p;
2045 if (! push_type (info, name))
2048 info->stack->flavor = structp ? "struct" : "union";
2050 fprintf (info->f, "%s\t%s\t0;\"\tkind:%c\n", name, info->filename,
2051 info->stack->flavor[0]);
2053 info->stack->visibility = DEBUG_VISIBILITY_PUBLIC;
2055 return indent_type (info);
2061 tg_fix_visibility (struct pr_handle *info, enum debug_visibility visibility)
2063 assert (info->stack != NULL);
2065 if (info->stack->visibility == visibility)
2068 assert (info->stack->visibility != DEBUG_VISIBILITY_IGNORE);
2070 info->stack->visibility = visibility;
2082 struct pr_handle *info = (struct pr_handle *) p;
2085 t = pop_type (info);
2089 if (! tg_fix_visibility (info, visibility))
2096 fprintf (info->f, "%s\t%s\t0;\"\tkind:m\ttype:%s\t%s:%s\taccess:%s\n",
2097 name, info->filename, t, info->stack->flavor, info->stack->type,
2120 struct pr_handle *info = (struct pr_handle *) p;
2124 info->indent += 2;
2128 tv = pop_type (info);
2143 if (! push_type (info, name))
2146 info->stack->flavor = structp ? "class" : "union class";
2147 info->stack->parents = NULL;
2148 info->stack->num_parents = 0;
2154 if (! append_type (info, " vtable "))
2158 if (! append_type (info, "self "))
2163 if (! append_type (info, tv)
2164 || ! append_type (info, " "))
2170 info->stack->visibility = DEBUG_VISIBILITY_PRIVATE;
2182 struct pr_handle *info = (struct pr_handle *) p;
2188 len_class = strlen (info->stack->next->type);
2192 sprintf (full_name, "%s::%s", info->stack->next->type, name);
2194 if (! substitute_type (info, full_name))
2200 if (! prepend_type (info, "static "))
2206 t = pop_type (info);
2213 if (! tg_fix_visibility (info, visibility))
2220 fprintf (info->f, "%s\t%s\t0;\"\tkind:x\ttype:%s\tclass:%s\taccess:%s\n",
2221 name, info->filename, t, info->stack->type,
2235 struct pr_handle *info = (struct pr_handle *) p;
2239 assert (info->stack != NULL && info->stack->next != NULL);
2241 t = pop_type (info);
2250 if (! push_type (info, t))
2255 if (! prepend_type (info, "virtual "))
2275 if (! prepend_type (info, prefix))
2278 t = pop_type (info);
2282 if (info->stack->num_parents && ! append_parent (info, ", "))
2285 if (! append_parent (info, t))
2287 info->stack->num_parents++;
2303 struct pr_handle *info = (struct pr_handle *) p;
2308 assert (info->stack != NULL);
2309 assert (info->stack->next != NULL);
2314 if (! append_type (info, " volatile"))
2319 if (! append_type (info, " const"))
2323 method_name = strdup (context ? info->stack->next->next->method
2324 : info->stack->next->method);
2327 if (! substitute_type (info, method_name))
2334 method_type = pop_type (info);
2346 context_type = pop_type (info);
2356 if (! tg_fix_visibility (info, visibility))
2364 fprintf (info->f, "%s\t%s\t0;\"\tkind:p\ttype:%s\tclass:%s\n",
2365 method_name, info->filename, method_type, info->stack->type);
2381 struct pr_handle *info = (struct pr_handle *) p;
2385 assert (info->stack != NULL);
2386 assert (info->stack->next != NULL);
2387 assert (info->stack->next->method != NULL);
2392 if (! append_type (info, " volatile"))
2397 if (! append_type (info, " const"))
2402 if (! prepend_type (info, "static "))
2405 method_name = strdup (info->stack->next->method);
2407 if (! substitute_type (info, info->stack->next->method))
2414 method_type = pop_type (info);
2422 if (! tg_fix_visibility (info, visibility))
2429 fprintf (info->f, "%s\t%s\t0;\"\tkind:p\ttype:%s\tclass:%s\taccess:%s\n",
2430 method_name, info->filename, method_type, info->stack->type,
2443 struct pr_handle *info = (struct pr_handle *) p;
2445 fprintf (info->f, "%s\t%s\t0;\"\tkind:c\ttype:%s", info->stack->type,
2446 info->filename, info->stack->flavor);
2447 if (info->stack->num_parents)
2449 fprintf (info->f, "\tinherits:%s", info->stack->parents);
2450 free (info->stack->parents);
2452 fputc ('\n', info->f);
2463 struct pr_handle *info = (struct pr_handle *) p;
2489 if (! push_type (info, t))
2499 if (! append_type (info, tag))
2510 struct pr_handle *info = (struct pr_handle *) p;
2513 s = pop_type (info);
2517 fprintf (info->f, "%s\t%s\t0;\"\tkind:t\ttype:%s\n", name,
2518 info->filename, s);
2531 struct pr_handle *info = (struct pr_handle *) p;
2534 t = pop_type (info);
2547 struct pr_handle *info = (struct pr_handle *) p;
2550 indent (info);
2552 fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const int\tvalue:%s\n",
2553 name, info->filename, ab);
2562 struct pr_handle *info = (struct pr_handle *) p;
2564 indent (info);
2565 fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const double\tvalue:%g\n",
2566 name, info->filename, val);
2575 struct pr_handle *info = (struct pr_handle *) p;
2579 t = pop_type (info);
2583 indent (info);
2585 fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:const %s\tvalue:%s\n",
2586 name, info->filename, t, ab);
2599 struct pr_handle *info = (struct pr_handle *) p;
2602 t = pop_type (info);
2607 if (info->demangler)
2608 dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
2626 fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:%s", name, info->filename, t);
2632 fprintf (info->f, "\tfile:");
2635 fprintf (info->f, "\tregister:");
2642 fprintf (info->f, "\tclass:%s", from_class);
2647 fprintf (info->f, "\n");
2659 struct pr_handle *info = (struct pr_handle *) p;
2663 info->stack->flavor = "static";
2665 info->stack->flavor = NULL;
2668 if (info->demangler)
2669 dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
2671 if (! substitute_type (info, dname ? dname : name))
2674 info->stack->method = NULL;
2681 info->stack->method = dname;
2687 info->stack->method = "";
2696 info->stack->parents = strdup (name);
2698 if (! info->stack->method && ! append_type (info, "("))
2701 info->parameter = 1;
2712 struct pr_handle *info = (struct pr_handle *) p;
2722 if (! substitute_type (info, name))
2725 t = pop_type (info);
2729 if (! info->stack->method)
2731 if (info->parameter != 1 && ! append_type (info, ", "))
2735 if (! append_type (info, "register "))
2738 if (! append_type (info, t))
2744 ++info->parameter;
2754 struct pr_handle *info = (struct pr_handle *) p;
2759 if (info->parameter > 0)
2761 info->parameter = 0;
2764 fprintf (info->f, "%s\t%s\t", info->stack->parents, info->filename);
2765 free (info->stack->parents);
2768 translate_addresses (info->abfd, ab, info->f, info->syms);
2769 local = info->stack->flavor != NULL;
2770 if (info->stack->method && *info->stack->method)
2773 partof = (char *) info->stack->method;
2779 if (! info->stack->method && ! append_type (info, ")"))
2782 t = pop_type (info);
2785 fprintf (info->f, ";\"\tkind:%c\ttype:%s", kind, t);
2787 fputs ("\tfile:", info->f);
2790 fprintf (info->f, "\tclass:%s", partof);
2793 fputc ('\n', info->f);