This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Integration of timed breakpoints into GDB
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: logitech <supriya dot rao17 at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 9 Sep 2011 23:33:09 +0200
- Subject: Re: Integration of timed breakpoints into GDB
- References: <32418104.post@talk.nabble.com>
On Wed, 07 Sep 2011 19:42:36 +0200, logitech wrote:
> I have attached a patch file which integrates timed breakpoints into gdb.
> http://old.nabble.com/file/p32418104/patchfile.patch patchfile.patch
> The format of the command is "break 'x's 'y'us" where 's' and 'us' stand for
> seconds and microseconds respectively. Eg. break 1s 0us
> When the program execution begins, it breaks after 1sec. On continuing, the
> program resumes again and breaks after 1 sec.
You can do:
(gdb) set target-async on
(gdb) continue &
(gdb) shell sleep 1
(gdb) interrupt
You could also rather code it by the Python scripting.
Isn't this a feature you can implement on top of GDB instead of inside GDB?
Thanks,
Jan