This patch makes sure that the value of segment registers are
read properly as 16bit values on Windows.
gdb/ChangeLog:
* windows-nat.h (segment_register_p_ftype): New typedef.
(windows_set_segment_register_p): Add declaration.
* windows-nat.c (segment_register_p): New static global.
(windows_set_segment_register_p): New function.
(do_windows_fetch_inferior_registers): Add special handling
for segment registers.
* amd64-windows-nat.c: #include "amd64-tdep.h".
(amd64_windows_segment_register_p): New function.
(_initialize_amd64_windows_nat): Call windows_set_segment_register_p.
* i386-windows-nat.c: #include "i386-tdep.h".
(i386_windows_segment_register_p): New function.
(_initialize_i386_windows_nat): Call windows_set_segment_register_p.
* i386-cygwin-tdep.c: Ditto.
* i386-windows-nat.c: Ditto.
* windows-nat.h: Ditto.
* windows-tdep.c: Ditto.
* windows-tdep.h: Ditto.
* windows-nat.c: Ditto.
(cygwin_load_start): Redefine as CORE_ADDR.
(cygwin_load_end): Ditto.
(windows_make_so): Coerce result of address arithmetic to to uintptr_t before
coercing to CORE_ADDR to avoid a compiler warning.
(handle_exception): Define addr as CORE_ADDR and coerce ExceptionAddress to
uintptr_t before assigining to avoid a compiler warning.
* config/djgpp/fnchange.lst: Add mappings for recently renamed windows files.
* win32-nat.c (mappings): Initialize to NULL.
(win32_set_context_register_offsets): New function.
* i386-windows-nat.c: New file.
(mappings): Moved here from win32-nat.c.
(_initialize_i386_windows_nat): New function.
* config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
* config/i386/cygwin.mh (NATDEPFILES): Likewise.