Reputation: 1916
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.... ????
Upvotes: 0
Views: 1350
Reputation:
No, because the demangled name will usually be invalid as a symbol name.
Upvotes: 0