Thank you very much for replying to my query.
I am using gdb as a software based fault injection
tool. I execute the program till a fault injection
point (breakpoint); inject a fault, ex. corrupting
a loop variable; then continue executing the program.
I experiment whether such faults result in segment
violation, assertion failure, etc.
Somtimes, when I inject a fault, the program may
go into an infinite loop. In that case, I want to
stop the program automatically.
The CTRL+C solution will not allow batchmode opertion
of gbd; and setting software breakpoints will require
modifying the original software. It would be great
if I can avoid changing the original software and
run gbd in batchmode.
Setting watchdog timers seems to be a suitable solution.
But, it doesn't seem to work, i.e., setting watchdog
timer to 3, doesn't send a signal and stop the program
after 3 seconds.
Thank you very much for help.
Rajesh
>
> I just press CTRL+C to temporarily stop the GDB if I suspect that my
> program has gone into infinite loop. If it hasn't, I just continue it
> with the `continue' command. Sometimes I also insert software
> breakpoint instructions to the code to make the GDB stop whenever the
> program is doing something I do not want it to do.
>
> Why would you want to stop the program automatically on infinite loops?
>
> Toni Ronkko
>
>
_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb