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
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan High Level Programming 1 04-30-2008 10:44 AM
multifile c program compilation and execution alokmishra8 UNIX for Dummies Questions & Answers 1 02-01-2008 01:05 AM
unix command for multifile program execution alokmishra8 Linux 0 02-01-2008 12:20 AM
execution small C++ program in UNIX bintaleb High Level Programming 5 09-26-2007 03:35 AM
get stack trace from C program on Solaris 8 rydahl Filesystems, Disks and Memory 4 03-23-2007 09:53 AM

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

Join Date: May 2008
Posts: 3
A program to trace execution of another program

Hi,

I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally.

If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-22-2008
Registered User
 

Join Date: May 2008
Posts: 26
Hi

Perhaps you might read the source code of strace command. I think it is what you want.

Hope it helps!
Reply With Quote
  #3 (permalink)  
Old 05-22-2008
Registered User
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 250
This functionality uis usually predicated on the ptrace (man ptrace) function under unixes. The userspace toolset depends. *BSD has ktrace, linux has strace, and solaris10 has a different method based on dtrace. Older solaris and aix has truss, HP-UX 11+ uses tusc.
Reply With Quote
  #4 (permalink)  
Old 08-19-2008
Registered User
 

Join Date: May 2008
Posts: 3
hey thanks tusc seems good.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:19 AM.


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