Search code examples
c++llvmname-manglingdemanglerc++filt

C++ filt not working. C++ name demangling


a symbol in linkmap file

0x10AEB7A48 0x00000034  [14199] __ZZZZZZZZZZN5kinda16FillCardInfoPage6renderEvENK3$_2clENSt3__110shared_ptrINS_12MMViewLayoutEEEENKUlNS3_INS_12MMScrollViewEEEE_clES7_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlNS3_INS_14MMBankEditViewEEEE_clESF_ENUlRKNS3_INS_5KViewEEEE_D1Ev

use c++flit:

➜  ~ c++filt --strip-underscore __ZZZZZZZZZZN5kinda16FillCardInfoPage6renderEvENK3$_2clENSt3__110shared_ptrINS_12MMViewLayoutEEEENKUlNS3_INS_12MMScrollViewEEEE_clES7_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlS5_E_clES5_ENKUlNS3_INS_14MMBankEditViewEEEE_clESF_ENUlRKNS3_INS_5KViewEEEE_D1Ev

➜  ~ c++filt --version
Apple LLVM version 12.0.0 (clang-1200.0.32.29)
Optimized build.
Default target: x86_64-apple-darwin20.3.0
Host CPU: skylake

result:

__ZZZZZZZZZZN5kinda16FillCardInfoPage6renderEvENK3

I think the symbol is an unnamed lambda type. Can We get the real scope and original name?


Solution

  • You need to add single quote around the command-line argument, to prevent the shell from expanding the dollar sign ($) in it.