[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help GDB & Watchdog...
From: |
V. Rajesh |
Subject: |
Help GDB & Watchdog... |
Date: |
Wed, 7 Mar 2001 17:26:26 -0500 |
Hi,
I face a problem. If anyone can help me, it will be great.
Basically, I want GDB to stop my program if it has gone into
an infinite loop.
I tried "set watchdog" command to achieve it. But, it doesn't
seem to work. I don't know whether I am doing it correctly.
Please help me.
Example: test.c - program runs into an infinite loop
int main()
{
while (1);
}
$ gcc -g test.c
$ gdb a.out
(gdb) set watchdog 3 /* I want GDB to stop the program if
does not terminate in 3 sec. */
(gdb) run
.... /* It hangs. Does not termite after 3 sec */
I tried many combinations. But, it doesn't work.
Thanks for your help,
Rajesh
PS: I am using gcc 2.95.2 and gdb 19990928. I am running
Debian linux (kernel 2.2.16)
- Help GDB & Watchdog...,
V. Rajesh <=