| 157 | |
| 158 | |
| 159 | word demangleSymbol(const char* sn) |
| 160 | { |
| 161 | word res; |
| 162 | int st; |
| 163 | char* cxx_sname = abi::__cxa_demangle |
| 164 | ( |
| 165 | sn, |
| 166 | nullptr, |
| 167 | 0, |
| 168 | &st |
| 169 | ); |
| 170 | |
| 171 | if (st == 0 && cxx_sname) |
| 172 | { |
| 173 | res = word(cxx_sname); |
| 174 | free(cxx_sname); |
| 175 | } |
| 176 | else |
| 177 | { |
| 178 | res = word(sn); |
| 179 | } |
| 180 | |
| 181 | return res; |
| 182 | } |
| 183 | |
| 184 | |
| 185 | // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |