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: [Patch] Win32 gdbserver new interrupt support, and attach to process fix.


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


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