Austin Schuh | 906616c | 2019-01-21 20:25:11 -0800 | [diff] [blame] | 1 | # Test caces for demangle_unittest. Each line consists of a |
| 2 | # tab-separated pair of mangled and demangled symbol names. |
| 3 | |
| 4 | # Constructors and destructors. |
| 5 | _ZN3FooC1Ev Foo::Foo() |
| 6 | _ZN3FooD1Ev Foo::~Foo() |
| 7 | _ZNSoD0Ev std::ostream::~ostream() |
| 8 | |
| 9 | # G++ extensions. |
| 10 | _ZTCN10LogMessage9LogStreamE0_So LogMessage::LogStream |
| 11 | _ZTv0_n12_N10LogMessage9LogStreamD0Ev LogMessage::LogStream::~LogStream() |
| 12 | _ZThn4_N7icu_3_410UnicodeSetD0Ev icu_3_4::UnicodeSet::~UnicodeSet() |
| 13 | |
| 14 | # A bug in g++'s C++ ABI version 2 (-fabi-version=2). |
| 15 | _ZN7NSSInfoI5groupjjXadL_Z10getgrgid_rEELZ19nss_getgrgid_r_nameEEC1Ei NSSInfo<>::NSSInfo() |
| 16 | |
| 17 | # C linkage symbol names. Should keep them untouched. |
| 18 | main main |
| 19 | Demangle Demangle |
| 20 | _ZERO _ZERO |
| 21 | |
| 22 | # Cast operator. |
| 23 | _Zcviv operator int() |
| 24 | _ZN3foocviEv foo::operator int() |
| 25 | |
| 26 | # Versioned symbols. |
| 27 | _Z3Foo@GLIBCXX_3.4 Foo@GLIBCXX_3.4 |
| 28 | _Z3Foo@@GLIBCXX_3.4 Foo@@GLIBCXX_3.4 |
| 29 | |
| 30 | # Abbreviations. |
| 31 | _ZNSaE std::allocator |
| 32 | _ZNSbE std::basic_string |
| 33 | _ZNSdE std::iostream |
| 34 | _ZNSiE std::istream |
| 35 | _ZNSoE std::ostream |
| 36 | _ZNSsE std::string |
| 37 | |
| 38 | # Substitutions. We just replace them with ?. |
| 39 | _ZN3fooS_E foo::? |
| 40 | _ZN3foo3barS0_E foo::bar::? |
| 41 | _ZNcvT_IiEEv operator ?<>() |
| 42 | |
| 43 | # "<< <" case. |
| 44 | _ZlsI3fooE operator<< <> |
| 45 | |
| 46 | # ABI tags. |
| 47 | _Z1AB3barB3foo A |
| 48 | _ZN3fooL3barB5cxx11E foo::bar |
| 49 | |
| 50 | # Random things we found interesting. |
| 51 | _ZN3FooISt6vectorISsSaISsEEEclEv Foo<>::operator()() |
| 52 | _ZTI9Callback1IiE Callback1<> |
| 53 | _ZN7icu_3_47UMemorynwEj icu_3_4::UMemory::operator new() |
| 54 | _ZNSt6vectorIbE9push_backE std::vector<>::push_back |
| 55 | _ZNSt6vectorIbSaIbEE9push_backEb std::vector<>::push_back() |
| 56 | _ZlsRSoRK15PRIVATE_Counter operator<<() |
| 57 | _ZSt6fill_nIPPN9__gnu_cxx15_Hashtable_nodeISt4pairIKPKcjEEEjS8_ET_SA_T0_RKT1_ std::fill_n<>() |
| 58 | _ZZ3FoovE3Bar Foo()::Bar |
| 59 | _ZGVZ7UpTimervE8up_timer UpTimer()::up_timer |
| 60 | |
| 61 | # Test cases from gcc-4.1.0/libstdc++-v3/testsuite/demangle. |
| 62 | # Collected by: |
| 63 | # % grep verify_demangle **/*.cc | perl -nle 'print $1 if /"(_Z.*?)"/' | |
| 64 | # sort | uniq |
| 65 | # |
| 66 | # Note that the following symbols are invalid. |
| 67 | # That's why they are not demangled. |
| 68 | # - _ZNZN1N1fEiE1X1gE |
| 69 | # - _ZNZN1N1fEiE1X1gEv |
| 70 | # - _Z1xINiEE |
| 71 | _Z1fA37_iPS_ f() |
| 72 | _Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i f() |
| 73 | _Z1fI1APS0_PKS0_EvT_T0_T1_PA4_S3_M1CS8_ f<>() |
| 74 | _Z1fI1XENT_1tES2_ f<>() |
| 75 | _Z1fI1XEvPVN1AIT_E1TE f<>() |
| 76 | _Z1fILi1ELc120EEv1AIXplT_cviLd4028ae147ae147aeEEE f<>() |
| 77 | _Z1fILi1ELc120EEv1AIXplT_cviLf3f800000EEE f<>() |
| 78 | _Z1fILi5E1AEvN1CIXqugtT_Li0ELi1ELi2EEE1qE f<>() |
| 79 | _Z1fILi5E1AEvN1CIXstN1T1tEEXszsrS2_1tEE1qE f<>() |
| 80 | _Z1fILi5EEvN1AIXcvimlT_Li22EEE1qE f<>() |
| 81 | _Z1fIiEvi f<>() |
| 82 | _Z1fKPFiiE f() |
| 83 | _Z1fM1AFivEPS0_ f() |
| 84 | _Z1fM1AKFivE f() |
| 85 | _Z1fM1AKFvvE f() |
| 86 | _Z1fPFPA1_ivE f() |
| 87 | _Z1fPFYPFiiEiE f() |
| 88 | _Z1fPFvvEM1SFvvE f() |
| 89 | _Z1fPKM1AFivE f() |
| 90 | _Z1fi f() |
| 91 | _Z1fv f() |
| 92 | _Z1jM1AFivEPS1_ j() |
| 93 | _Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_ r() |
| 94 | _Z1sPA37_iPS0_ s() |
| 95 | _Z1xINiEE _Z1xINiEE |
| 96 | _Z3absILi11EEvv abs<>() |
| 97 | _Z3foo3bar foo() |
| 98 | _Z3foo5Hello5WorldS0_S_ foo() |
| 99 | _Z3fooA30_A_i foo() |
| 100 | _Z3fooIA6_KiEvA9_KT_rVPrS4_ foo<>() |
| 101 | _Z3fooILi2EEvRAplT_Li1E_i foo<>() |
| 102 | _Z3fooIiFvdEiEvv foo<>() |
| 103 | _Z3fooPM2ABi foo() |
| 104 | _Z3fooc foo() |
| 105 | _Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_ foo() |
| 106 | _Z3kooPA28_A30_i koo() |
| 107 | _Z4makeI7FactoryiET_IT0_Ev make<>() |
| 108 | _Z5firstI3DuoEvS0_ first<>() |
| 109 | _Z5firstI3DuoEvT_ first<>() |
| 110 | _Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE hairyfunc() |
| 111 | _ZGVN5libcw24_GLOBAL__N_cbll.cc0ZhUKa23compiler_bug_workaroundISt6vectorINS_13omanip_id_tctINS_5debug32memblk_types_manipulator_data_ctEEESaIS6_EEE3idsE libcw::(anonymous namespace)::compiler_bug_workaround<>::ids |
| 112 | _ZN12libcw_app_ct10add_optionIS_EEvMT_FvPKcES3_cS3_S3_ libcw_app_ct::add_option<>() |
| 113 | _ZN1AIfEcvT_IiEEv A<>::operator ?<>() |
| 114 | _ZN1N1TIiiE2mfES0_IddE N::T<>::mf() |
| 115 | _ZN1N1fE N::f |
| 116 | _ZN1f1fE f::f |
| 117 | _ZN3FooIA4_iE3barE Foo<>::bar |
| 118 | _ZN5Arena5levelE Arena::level |
| 119 | _ZN5StackIiiE5levelE Stack<>::level |
| 120 | _ZN5libcw5debug13cwprint_usingINS_9_private_12GlobalObjectEEENS0_17cwprint_using_tctIT_EERKS5_MS5_KFvRSt7ostreamE libcw::debug::cwprint_using<>() |
| 121 | _ZN6System5Sound4beepEv System::Sound::beep() |
| 122 | _ZNKSt14priority_queueIP27timer_event_request_base_ctSt5dequeIS1_SaIS1_EE13timer_greaterE3topEv std::priority_queue<>::top() |
| 123 | _ZNKSt15_Deque_iteratorIP15memory_block_stRKS1_PS2_EeqERKS5_ std::_Deque_iterator<>::operator==() |
| 124 | _ZNKSt17__normal_iteratorIPK6optionSt6vectorIS0_SaIS0_EEEmiERKS6_ std::__normal_iterator<>::operator-() |
| 125 | _ZNSbIcSt11char_traitsIcEN5libcw5debug27no_alloc_checking_allocatorEE12_S_constructIPcEES6_T_S7_RKS3_ std::basic_string<>::_S_construct<>() |
| 126 | _ZNSt13_Alloc_traitsISbIcSt18string_char_traitsIcEN5libcw5debug9_private_17allocator_adaptorIcSt24__default_alloc_templateILb0ELi327664EELb1EEEENS5_IS9_S7_Lb1EEEE15_S_instancelessE std::_Alloc_traits<>::_S_instanceless |
| 127 | _ZNSt3_In4wardE std::_In::ward |
| 128 | _ZNZN1N1fEiE1X1gE _ZNZN1N1fEiE1X1gE |
| 129 | _ZNZN1N1fEiE1X1gEv _ZNZN1N1fEiE1X1gEv |
| 130 | _ZSt1BISt1DIP1ARKS2_PS3_ES0_IS2_RS2_PS2_ES2_ET0_T_SB_SA_PT1_ std::B<>() |
| 131 | _ZSt5state std::state |
| 132 | _ZTI7a_class a_class |
| 133 | _ZZN1N1fEiE1p N::f()::p |
| 134 | _ZZN1N1fEiEs N::f() |
| 135 | _ZlsRK1XS1_ operator<<() |
| 136 | _ZlsRKU3fooU4bart1XS0_ operator<<() |
| 137 | _ZlsRKU3fooU4bart1XS2_ operator<<() |
| 138 | _ZlsRSoRKSs operator<<() |
| 139 | _ZngILi42EEvN1AIXplT_Li2EEE1TE operator-<>() |
| 140 | _ZplR1XS0_ operator+() |
| 141 | _Zrm1XS_ operator%() |
| 142 | |
| 143 | # Template argument packs can start with I or J. |
| 144 | _Z3addIIiEEvDpT_ add<>() |
| 145 | _Z3addIJiEEvDpT_ add<>() |