[RFC] New gdbserver Win32 interrupt code

Lerele lerele@champenstudios.com
Sun Nov 4 01:28:00 GMT 2007


Hello,

Sorry for the delay, didn't get the time to continue with gdbserver 
Win32 coding.

Some time ago I suggested a method to better support remote interrupt of 
debugged process, in this thread:
http://sourceware.org/ml/gdb-patches/2007-03/msg00026.html

The attached patch does just what I described there, with all the 
benefits I discussed back then.
I have tried to code the bits with WinCE in mind by copying how it's 
already done for WinCE (LoadLibrary basically), but I have not compiled 
nor tested it under Windows CE. However, it does work fine with Cygwin.

Also I fixed what I think is a slight bug in thread suspend/resume in 
win32-low.c, and something that is also related with this new interrupt 
thread pause/resume functionality.
The thread_rec function was setting the gdbserver internal suspend_count 
to the number of suspends a thread actually has, as reported by Windows. 
However I think this is erroneous to keep this way because a thread may 
already be paused by the application being debugged, and as such when 
gdbserver pauses/resumes threads, it could wake up a child thread that 
should actually stay paused.

I have also kept old functionality with the macro NEW_INT in case 
someone needs/want to fallback to the old code. This can also be removed 
of course.
Any thoughts about this new functionality?

Hope patch is Ok.

Regards,
Leo.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff-newint
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071104/24ec5bc9/attachment.ksh>


More information about the Gdb-patches mailing list