Sponsored Content
Top Forums Programming A program to trace execution of another program Post 302197971 by jiten_hegde on Thursday 22nd of May 2008 03:13:51 AM
Old 05-22-2008
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.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

get stack trace from C program on Solaris 8

I'm on solaris 8. I need to check the stack trace inside my C program. I don't have printstack or walkstack. I tested getcontext and it works. But how do I get the symbols from "stack_t" ? Help please. Many thanks! (4 Replies)
Discussion started by: rydahl
4 Replies

2. Programming

execution small C++ program in UNIX

Hi my friends I am beginner unix programmer I have written small c++ program in text editor and I have change it mode to 555 to make it executable file to use it in unix O.P. #include<iostream.h> main() { cout<<"Hello World"; } but some syntax erroe came for << can any one help... (5 Replies)
Discussion started by: bintaleb
5 Replies

3. Linux

unix command for multifile program execution

how can I compile and execute multifile program in unix os.:o (0 Replies)
Discussion started by: alokmishra8
0 Replies

4. UNIX for Dummies Questions & Answers

multifile c program compilation and execution

i am using unix os and my program is divided in two text files .:):) how to compile and make one executable file, using unix command. (1 Reply)
Discussion started by: alokmishra8
1 Replies

5. Solaris

Program execution order like FIFO queue

Hi all: I have a problem with a C++ service runing on solaris 10. This service only set a signal on oracle table. When the service detect a cut off on the line (tcp/ip), trigger a cobol program for set the signal OFF. When the line is on again, the service trigger the same cobol program for set... (0 Replies)
Discussion started by: hcastellani
0 Replies

6. Programming

Debugging Program during execution

I have made use of 'valgrind' and -finstrument-functions compiler option for debugging / analyzing code. Both the options lets us know the line / file being executed to some extent. Is there a generic way that lets program dump the file:line it is getting executed dumped to a log file during... (3 Replies)
Discussion started by: uunniixx
3 Replies

7. Programming

popen hangs program during cmd execution

How can I get around this? when my program reaches the following popen job it halts the program until the ping/netstat/ipconfig/traceroute is completed then resume to the rest of the program... FILE *in; extern FILE *popen(); char buff; char newline; char nstat; char nping; ... (5 Replies)
Discussion started by: Jess83
5 Replies

8. Programming

i want trace the c program flow in unix

In windows there is separate environment for c language. and we can able to trace the program. but how can i trace c program flow in unix :confused: (1 Reply)
Discussion started by: prakash.tau
1 Replies

9. Programming

Help with C++ program execution.

//Find the root of the equation (x^2)-2 by bisection method. #include<iostream> using namespace std; double a,x; double f(double x) { return ((x*x)-2); } //Suppose the function is (x*x)-2. void calcx(double a1,double b1) { x =... (2 Replies)
Discussion started by: poonam.gaigole
2 Replies

10. Shell Programming and Scripting

Execution of compressed program

I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script. (3 Replies)
Discussion started by: new2script
3 Replies
sigpause(3)						     Library Functions Manual						       sigpause(3)

NAME
sigpause - Provides a compatibility interface to the sigsuspend function LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <signal.h> int sigpause ( int signal_mask ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: sigpause(): XSH4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies which signals to block. DESCRIPTION
The sigpause() function call blocks the signals specified by the signal_mask parameter and then suspends execution of the process until delivery of a signal whose action is either to execute a signal-catching function or to end the process. Signal of value i is blocked if the i-th bit of the mask is set. Only signals with values 1 to 31 can be blocked with the sigpause() function. In addition, the sigpause() function does not allow the SIGKILL, SIGSTOP, or SIGCONT signals to be blocked. If a program attempts to block one of these signals, the sigpause() function gives no indication of the error. The sigpause() function sets the signal mask and waits for an unblocked signal as one atomic operation. This means that signals cannot occur between the operations of setting the mask and waiting for a signal. The sigpause() function is provided for compatibility with older UNIX systems; its function is a subset of the sigsuspend() function. NOTES
[Tru64 UNIX] When compiled in the X/Open UNIX environment, calls to the sigpause() function are internally renamed by prepending _E to the function name. When you are debugging a module that includes the sigpause() function and for which _XOPEN_SOURCE_EXTENDED has been defined, use _Esigpause to refer to the sigpause() call. See standards(5) for information on when the _XOPEN_SOURCE_EXTENDED macro is defined. RETURN VALUES
Upon successful completion, sigpause() returns 0 (zero). Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The sigpause() function sets errno to the specified values for the following conditions: The signal_mask parameter refers to an illegal signal number. [Tru64 UNIX] A signal was caught by the calling process. RELATED INFORMATION
Functions: pause(3), sigaction(2), sigblock(2), sigprocmask(2), sigsuspend(2), sigvec(2) Standards: standards(5) delim off sigpause(3)
All times are GMT -4. The time now is 07:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy