This is the mail archive of the gdb-patches@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: [RFC] New gdbserver Win32 interrupt code


Lerele wrote:
Hello,

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


Welcome back!


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.


I also implemented the synthetic suspending here, because soon after that thread, I had a need for it in WinCE. Unfortunatelly, I got distracted with other things and never submitted. I hate it when work gets duplicated :(

At a quick glance, I think your patch should be at least split
in 3.

1 - the synthetic suspending

  On WinCE, the synthetic suspending is also needed when
attaching, since in opposition to 9xNT, the OS doesn't stop
the inferior at all (neither when attaching nor running).
If you're OK with it, I'll clean up my patch a bit, and merge
with your bits so 1 can go in first.  It will be easier for me
this way, since I've already taken care of the function
reusing and ifdefing minimising.  I'll then volunteer to
clean up the rest of your patch for you, as a reward for
you patience  ;)

2 - the suspend count handling

  This is also a problem in native debugging
  (gdb/win32-nat.c).  I also saw this when doing my version
  of 1.  I got a chance to look at the logs of the native
  WinCE debugger, and could infer that it also takes care of
  this correctly.  The way they do it, is to read the current
  suspend count by always doing a SuspendThread + ResumeThread
  sequence on a debug event (ResumeThread return the current
  suspend count).

3 - the elevation

Cheers,
Pedro Alves



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