[LLVMdev] Decoding munged function names

Rafael Espindola espindola at google.com
Thu Feb 4 14:12:54 PST 2010


On 4 February 2010 17:03, Sarah Thompson <sarah at findatlantis.com> wrote:
> Hi folks,
>
> I'm currently extending my model checker to collect coverage
> information, and as part of this I'm finding a need to get a more
> friendly version of munged C++ identifiers than the name used by the
> linker. For example, though internally, something like '_Z7thread1Pv'
> is fine as an identifier, I'd like to be able to give the user
> something more readable. Since the disassembler seems to be able to do
> this, I'd like to be able to do it too, though I can't spot anything
> in the Function class interface that looks like a candidate. My code
> needs to live inside an opt pass, effectively within one of my code
> annotation passes.

Can you just run c++filt?

c++filt  _Z7thread1Pv
thread1(void*)

> Thank you in advance,
> Sarah Thompson
>
> PS: I've been quiet for a while, but I'm still at NASA Ames, plugging
> away at my LLVM-based model checker.

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-dev mailing list