This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch] Win32 gdbserver new interrupt support, and attach to process fix.
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: Pedro Alves <pedro_alves at portugalmail dot pt>
- Cc: Lerele <lerele at champenstudios dot com>, gdb-patches at sourceware dot org
- Date: Mon, 05 Mar 2007 01:21:39 +0000
- Subject: Re: [Patch] Win32 gdbserver new interrupt support, and attach to process fix.
- References: <45DF7E27.10102@champenstudios.com> <45E211A5.6080905@portugalmail.pt> <45EB4D5A.7070703@champenstudios.com> <45EB6AC8.3090307@portugalmail.pt>
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