This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Timer


>>>>> "Marc" == Marc BrÃnink <marc@nus.edu.sg> writes:

Pedro> I guess you could do it with gdb python scripting too.

Marc> This would be nice but does not work. As far as I remember there is a
Marc> sigsupend in linux-nat.c which will thwart using a simple
Marc> threading.Timer. But I might be wrong here. Whatever the reason, it
Marc> does not work.

I would try making a new thread in Python and setting timers in this
thread.  Then, when a timer fires, have it use gdb.post_event to send an
event to the gdb thread.  This event would use gdb.execute("interrupt")
to stop the inferior and trigger some processing.

I'm not totally sure this will work.  If not it would be interesting to
know what is needed to make it work.  I think at the very least it shows
that inferior control isn't exposed very well to Python.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]