Question

I am just trying to learn c++filt, there are not enough example usage available in the web....

I am writing a main.cpp file and trying to read the machine code....

g++ -S main.cpp -> gives me main.s

if I need to find out an demangled value, I could use

g++ -S main.cpp | c++filt <demangled name>

eg)

g++ -S main.cpp | c++filt _Z3gooi

gives me value goo(int i)// which is the signature,

Is there a way, where you replace the current main.s file with demangled values, for example, the _Z3gooi will be demangled as goo(int i) in the file itself, instead of console.... ????

Was it helpful?

Solution

Can be done in

C++filt<main.s>temp.s

OTHER TIPS

No, because the demangled name will usually be invalid as a symbol name.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top