This patch is the bulk of the new WinCE support. It contains: - The new WinCE support on gdb/ side. - The gdbserver port. WinCE has the following (and a few more) twists: - No errno/perror/strerror - The runtime only knows about GetLastError/SetLastError. - No signals support. - The initial breakpoint (the automatically inserted at the entry point breakpoint) must be inserted manually. - All programs link to coredll.dll instead of kernel32.dll. - CreateProcess has the same signature as the 9x/NT Windows, but a bunch of parameters are unsupported, and the image name (first param) must never be null. There was a little bug in win32-low.c (original win32-i386-low.c). There was a call to strerror (GetLastError ()), but strerror should take an errno value, not a winerror, as the error codes are not compatible. That was fixed by using a new strwinerror function, that is used also as a replacement for strerror on WinCE. The patch moves the gdbserver i386 specifics into a new win32-i386-low.c, and the new arm stuff into win32-arm-low.c. The changes were modelled on the linux support. It was done this way to minimize the #ifdefery. The arm/i386 differences are mostly: - the gdb/'win32 Context' register mappings - I need to store the ARM WinCE breakpoint opcode somewhere - it is used to insert the initial breakpoint. - The i386 debug registers handling (although watchpoint support isn't really implemented in win32-i386-low.c currently; gdb/i386-nat.c would have to be copied/used from gdbserver). Note that i386/arm is orthogonal to 9x/NT/CE. WinCE can also be i386. I stashed the i386 debug registers copying into a load/store interface, mainly because I needed to get them out of the generic win32-low.c. I'm open to better suggestions. Note that although the debug registers handling code was copied from gdb/win32-nat.c, watchpoints are not supported, making the debug registers copying unneeded; they could be disabled until proper watchpoint support is implemented. With this patch, the old config/arm/tm-wince.h, wince.c, wince-stub.h and wince-stub.c file can finally go away. Cheers, Pedro Alves