[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Digital Ladebug debugger |
|
Moderator: | TLE::LUCIA |
|
Created: | Fri Feb 28 1992 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 969 |
Total number of notes: | 3959 |
852.0. "Decladebug and librt and Signals" by RHETT::HALETKY () Wed Feb 26 1997 11:28
Hello,
We have a cusotmer that has the following code, when debugging
decladebug traps a segv that does not occur when running the program
outside the debugger. Ignoring signals does not work. Any suggestions?
#include <signal.h>
#include <time.h>
timer_t timer_id;
struct itimerspec remtim;
static struct sigaction old_action, action;
static sigset_t sigmask, old_sigmask;
static void setimr_alarm (int signal);
main()
{
struct itimerspec waketim, otime;
int i;
sigemptyset( &sigmask );
sigaddset( &sigmask, SIGALRM );
action.sa_handler = setimr_alarm;
sigemptyset( &action.sa_mask );
sigaddset( &action.sa_mask, SIGALRM );
action.sa_flags = 0;
sigaction( SIGALRM, &action, &old_action );
sigprocmask( SIG_BLOCK, &sigmask, &old_sigmask );
if (timer_create( TIMEOFDAY, (struct sigevent *)0, &timer_id)) {
printf("timer_create: failed\n");
exit(1);
}
memset( &waketim, 0, sizeof(waketim));
waketim.it_value.tv_nsec = 250000000;
if (timer_settime( timer_id, 0, &waketim, 0)){
printf("timer_settime: failed\n");
exit(1);
}
sigprocmask( SIG_UNBLOCK, &sigmask, NULL );
timer_gettime (timer_id, &remtim);
sleep(1);
printf("done!\n");
}
static void setimr_alarm (int signal)
{
printf("setimr_alarm: remtim = %d\n", remtim.it_value.tv_nsec);
timer_gettime (timer_id, &remtim);
printf("setimr_alarm: remtim = %d\n", remtim.it_value.tv_nsec);
}
compilation is done with:
cc -g file.c -o file -lrt
Best regards,
Ed Haletky
Digital CSC
T.R | Title | User | Personal Name | Date | Lines |
---|
852.1 | | TLE::MURRAY | Wanfang Murray | Wed Feb 26 1997 15:02 | 4 |
|
Thanks for the problem report. I will take a look at this.
Wanfang
|
852.2 | | TLE::MURRAY | Wanfang Murray | Fri Feb 28 1997 12:18 | 6 |
|
It's interesting. I am able to reproduce this problem with both ladebug
and dbx on PTB system.
Wanfang
|
852.3 | RT interference? | RHETT::HALETKY | | Mon Mar 03 1997 13:42 | 7 |
| This is good to read. I was curious as to what is happening. For now
the customer can't use any debugger except print messages. :}
Could it be the Real Time system getting in the way?
-Ed Haletky
Digital CSC
|
852.4 | | TLE::MURRAY | Wanfang Murray | Mon Mar 03 1997 14:23 | 8 |
|
Ladebug and dbx is tracing system calls like exec and fork. However,
those system calls also mean something in the RT habitat. Now, I am
in the middle instrumenting ladebug only care about these system calls
in the basic habitat context. The fix is coming.
Wanfang
|