LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2012, 01:17 PM   #1
howtechstuffworks
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Rep: Reputation: 0
c++filt usage


Hi all,
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.... ????

Last edited by howtechstuffworks; 03-03-2012 at 01:23 PM.
 
Old 03-04-2012, 06:15 PM   #2
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 211

Rep: Reputation: 67
Quote:
Originally Posted by howtechstuffworks View Post
Hi all,
Is there a way, where you replace the current main.s file with demangled values
How about
Code:
c++filt main.s >main.s+ ; ln main.s{,~} ; mv main.s{+,}
?

The link-and-move safety is surely overkill here, but you seem new so I offer that sequence as an example to learn from.
 
  


Reply

Tags
assembly, c++ compiler, filtering, g++ error


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Firefox add-on Glubble too clunky and restrictive as a children's Internet filt LXer Syndicated Linux News 0 07-21-2008 02:20 PM
X hangs after prolonged usage ... memory usage goes upto 195MB duryodhan Slackware 18 05-10-2007 07:16 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM
Web filtering: URL filt or rate content..or? Linux Learning Linux - Security 2 10-01-2003 08:46 AM


All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration