How to demange C++ names

Hey all,

Just wondering if LLVM has any command options or tool to allow for
demangling C++ names from the LLVM bitcode?

Thanks!

Best,
Xiaolong

c++filt?

--renato

Thanks Renato,

> Just wondering if LLVM has any command options or tool to allow for
> demangling C++ names from the LLVM bitcode?

c++filt?

This would work anyway, providing a base to write a script for my purpose.

Best,
Xiaolong

Hi Renato,

> Just wondering if LLVM has any command options or tool to allow for
> demangling C++ names from the LLVM bitcode?

c++filt?

Do you refer to any particular version of c++filt? I tried, but seemed
not to work. For example, when I run a command as below:

  c++filt _ZNSt4listIiSaIiEEaSERKS1_

The output remains the same as the input symbol.

By the way, when I run
  
  c++filt -v

It outputs:

  GNU c++filt 070207 20070207
  Copyright 2005 Free Software Foundation, Inc.
  This program is free software; you may redistribute it under the terms of
  the GNU General Public License. This program has absolutely no warranty.

Best,
Xiaolong

Hi Renato,

Just wondering if LLVM has any command options or tool to allow for
demangling C++ names from the LLVM bitcode?

c++filt?

Do you refer to any particular version of c++filt? I tried, but seemed
not to work. For example, when I run a command as below:

c++filt _ZNSt4listIiSaIiEEaSERKS1_

Try:
c++filt __ZNSt4listIiSaIiEEaSERKS1_

-Chris

[snip]

   c++filt _ZNSt4listIiSaIiEEaSERKS1_

The output remains the same as the input symbol.

By the way, when I run

   c++filt -v

It outputs:

   GNU c++filt 070207 20070207
   Copyright 2005 Free Software Foundation, Inc.
   This program is free software; you may redistribute it under the terms of
   the GNU General Public License. This program has absolutely no warranty.

[snip]

Here's what I get:

main% c++filt _ZNSt4listIiSaIiEEaSERKS1_
std::list<int, std::allocator<int> >::operator=(std::list<int, std::allocator<int> > const&)
[~/ecc/llvm/lib/Target/Mips] main% c++filt -v
GNU c++filt version 2.19.51.0.14-37.fc12 20090722
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

Hi Chris,

>>> Just wondering if LLVM has any command options or tool to allow for
>>> demangling C++ names from the LLVM bitcode?
>>
>> c++filt?
>
> Do you refer to any particular version of c++filt? I tried, but seemed
> not to work. For example, when I run a command as below:
>
> c++filt _ZNSt4listIiSaIiEEaSERKS1_

Try:
c++filt __ZNSt4listIiSaIiEEaSERKS1_

This works. Thanks!

Best,
Xiaolong

Me too...

$ c++filt _ZNSt4listIiSaIiEEaSERKS1_
std::list<int, std::allocator<int> >::operator=(std::list<int,
std::allocator<int> > const&)

GNU c++filt (GNU Binutils for Ubuntu) 2.20

cheers,
--renato

Do you refer to any particular version of c++filt? I tried, but seemed
not to work. For example, when I run a command as below:

c++filt _ZNSt4listIiSaIiEEaSERKS1_

The output remains the same as the input symbol.

Try to prepend underscore. I have:
$ c++filt __ZNSt4listIiSaIiEEaSERKS1_
std::list<int, std::allocator<int> >::operator=(std::list<int,
std::allocator<int> > const&)