Open PeterMatula opened 6 years ago
Thank you for the report.
However, we will not be able to fix this in the current implementation. See #95.
Sorry we did not make this clear from the start.
Another problem:
Input: demangler _ZL21size_of_encoded_valueh
Output:
gcc: cGram::subanalyze: Syntax error: No rule for NT encoding and T L.
ms: cGram::analyze: Syntax error: No rule for NT mangled-name and T _.
borland: cGram::analyze: Syntax error: No rule for NT mangled-name and T _.
Expected output (https://demangler.com/): size_of_encoded_value(unsigned char)
More examples to analyze:
gcc:
_ZStmiISt6vectorIN5cName6type_tESaIS2_EERS4_PS4_ENSt15_Deque_iteratorIT_T0_T1_E15difference_typeERKSB_SE_
_ZTI5cName
_ZTS5cName
_ZTVN10__cxxabiv117__class_type_infoE
_ZdlPvS_
ms:
?_Left@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@DU?$pair@IW4semact@cGram@@@std@@U?$less@D@2@V?$allocator@U?$pair@$$CBDU?$pair@IW4semact@cGram@@@std@@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@DU?$pair@IW4semact@cGram@@@std@@U?$less@D@2@V?$allocator@U?$pair@$$CBDU?$pair@IW4semact@cGram@@@std@@@std@@@2@@2@@std@@@2@$0A@@std@@@std@@KAAAPAU_Node@?$_Tree_nod@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@DU?$pair@IW4semact@cGram@@@std@@U?$less@D@2@V?$allocator@U?$pair@$$CBDU?$pair@IW4semact@cGram@@@std@@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$map@DU?$pair@IW4semact@cGram@@@std@@U?$less@D@2@V?$allocator@U?$pair@$$CBDU?$pair@IW4semact@cGram@@@std@@@std@@@2@@2@@std@@@2@$0A@@std@@@2@PAU342@@Z
borland:
@$xt$p19Comobj@EOleSysError
This is being worked on by one student as his bachelor thesis - see milestone and the referenced forked repository.
With the new demangler (#95):
?debugf@@YAXPB_WZZ
-> void __cdecl debugf(wchar_t const *)
: still bad_ZL21size_of_encoded_valueh
: OKSo the only one to look at is ?debugf@@YAXPB_WZZ
.
Originally reported by @q1o1p in https://github.com/avast-tl/demangler/issues/1.
elliptic function like
?debugf@@YAXPB_WZZ
demangling wrong. now:void __cdecl debugf(wchar_t const *)
must be:void __cdecl debugf(wchar_t const *,...)
lose...