Getting a full signature of template instantiation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am looking into GCCXML (GCC 4.2) and gccxml_plugin running 4.8 and 4.9 output differences.

GCCXML produces:

<Struct id="_731" name="basic_string<char,std::char_traits<char>,std::allocator<char> >" context="_2" mangled="Ss" demangled="std::string" location="f25:57" file="f25" line=" 57" artificial="1" size="64" align="64" members="_1545 _1546 _1547 _1548 _1549 _1550 _1551 _1552 _1554 _1556 _1557 _1558 _1559 _1560 _1561 _1562 _1563 _1564 _1565 _1566 _1567 _     1568 _1569 _1570 _1571 _1572 _1573 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1595 _1596 _15     97 _1598 _1599 _1600 _1601 _1602 _1603 _1604 _1605 _1606 _1607 _1608 _1609 _1610 _1611 _1612 _1613 _1614 _1615 _1616 _1617 _1618 _1619 _1620 _1621 _1622 _1623 _1624 _1625 _1626      _1627 _1628 _1629 _1630 _1631 _1632 _1633 _1634 _1635 _1636 _1637 _1638 _1639 _1640 _1641 _1642 _1643 _1644 _1645 _1646 _1647 _1648 _1649 _1650 _1651 _1652 _1653 _1654 _1655 _     1656 _1657 _1658 _1659 _1660 _1661 _1662 _1663 _1664 _1665 _1666 _1667 _1668 _1669 _1670 _1671 _1672 _1673 _1674 _1675 _1676 _1677 _1678 _1679 _1680 _1681 _1682 _1683 _1684 _16     85 _1686 _1687 _1688 _1689 _1690 _1691 _1692 _1693 _1694 _1695 _1696 " bases=""/>  
<Typedef id="_748" name="string" type="_731" context="_2" location="f25:62" file="f25" line="62"/>

gccxml_plugin:

<Class id="_542" name="basic_string" context="_2" isScoped="1" mangled="Ss" demangled="std::string" location="f24:112" file="f24" line="112" artificial="1" size="64" align="6 4" template="1" templateName="basic_string" members="_919 _920 _922 _924 _925 _926 _927 _928 _930 _932 _933 _934 _936 _938 _940 _942 _943 _944 _945 _946 _947 _948 _949 _950 _95     1 _952 _953 _954 _955 _956 _957 _958 _959 _960 _961 _962 _963 _964 _965 _966 _967 _968 _969 _970 _971 _972 _973 _974 _975 _976 _977 _978 _979 _980 _981 _982 _983 _984 _985 _986      _987 _988 _989 _990 _991 _992 _993 _994 _995 _996 _997 _998 _999 _1000 _1001 _1002 _1003 _1004 _1005 _1006 _1007 _1008 _1009 _1010 _1011 _1012 _1013 _1014 _1015 _1016 _1017 _1     018 _1019 _1020 _1021 _1022 _1023 _1024 _1025 _1026 _1027 _1028 _1029 _1030 _1031 _1032 _1033 _1034 _1035 _1036 _1037 _1038 _1039 _1040 _1041 _1042 _1043 _1044 _1045 _1046 _104     7 _1048 _1049 _1050 _1051 _1052 _1053 _1054 _1055 _1056 _1057 _1058 _1059 _1060 _1061 _1062 _1063 _1064 _1065 _1066 _1067 _1068 _1069 _1070 _1071 _1072 _1073 _1074 _1075 _1076      " bases="" />
<Typedef id="_543" name="string" type="_542" context="_2" isScoped="1" location="f25:62" file="f25" line="62"/> 

The key difference is `name` attribute:

name="basic_string<char,std::char_traits<char>,std::allocator<char> >" 
name="basic_string"

In GCCXML it does IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (rt))). 

Under @item DECL_NAME in (./gcc/doc/generic.texi): For an instantiation of a function template, the @code{DECL_NAME} is the unqualified name of the template, not something like @code{f<int>}.

Is there an easy way to acquire a full signature of template instantiation under 4.8 and 4.9? Or one needs to write it's own function producing it?

Thanks,
david




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux