[Patch] Win32 gdbserver new interrupt support, and attach to process fix.

Pedro Alves pedro_alves@portugalmail.pt
Mon Mar 5 01:21:00 GMT 2007


Pedro Alves wrote:

> Lerele wrote:
>> Pedro Alves wrote:
>> I was wrong, res is not a Win32 BOOL, it's plainly a 0 or a 1.
> 
> Then make it a BOOL, it makes the code clearer anyway.  See attachment.
> 
> 

Or leave it an int, and fix the constants, which looks
like what was intended in the first place.


-  res = DebugActiveProcess (pid) ? 1 : 0;
+  res = DebugActiveProcess (pid) ? -1 : 0;

     if (current_process_handle == NULL)
       {
-      res = 0;
+      res = -1;
        if (DebugActiveProcessStop != NULL)
  	DebugActiveProcessStop (current_process_id);
      }

(...)

    if (kernel32 != NULL)
      FreeLibrary (kernel32);

-  return res? 0:-1;
+  return res;
}

Anyway, what I really wanted to say, that I had forgotten, was that
if you posted this patch isolated from the rest of the interrupt
support, it would be probably be classified as an "obvious" fix,
and could go in much faster.

Cheers,
Pedro Alves



More information about the Gdb-patches mailing list