The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
strip command Saurabh78 UNIX for Advanced & Expert Users 1 04-15-2008 06:15 AM
Need to strip few letters achararun Shell Programming and Scripting 5 03-11-2008 05:08 PM
Need to strip a string x96riley3 Shell Programming and Scripting 6 01-27-2007 05:21 AM
Strip all non-alphanumerics braindrain Shell Programming and Scripting 3 09-17-2006 11:21 AM
How to strip strins kamathg Shell Programming and Scripting 14 03-23-2006 10:04 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2008
Registered User
 

Join Date: Jun 2004
Posts: 26
Strip command

I am new in Unix. I go through the man strip. But did not understand that, why when we have -G (debug and release ) option in the compiler, than using strip command to strip the debug information from the objects. i want to binary for teh production i will compile it without debug option. What the exact scenario where strip command is useful.
Thanks in advanced.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-15-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,573
using strip to remove debugging information from a production binary or creating a production binary without symbol table information / debugging information is highly not recommended

what if the binary crashes in the production ?

With the debugging information / symbol table information, it would be very helpful for debugging.
Reply With Quote
  #3 (permalink)  
Old 04-15-2008
Registered User
 

Join Date: Jun 2004
Posts: 26
Ok. Like i have created one binary with the debug option debug.out and another without it is production.out. Now, i will stripe the debug.out. Now, both binary will be same? or have any differences.
Reply With Quote
  #4 (permalink)  
Old 04-15-2008
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,573
no they won't be the same

the answer is in your question ..
stripped version - will not have debugging symbols, symbol table

unstripped version - will have all the necessary information to debug on a core or to debug a running process

stripped version - would be helpful ( not always and it is subjective ) when binary needs to be transferred to another host for execution, run test for batch builds something of that kind
Reply With Quote
  #5 (permalink)  
Old 04-15-2008
Registered User
 

Join Date: Jun 2004
Posts: 26
thanks Mtarix
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0