> I'm not sure we can make those changes. The default layout for the > registers in the target description is chosen such that it is > compatible with the "old" register cache layout used for stubs that > didn't provide a target description. That layout is still extensively > used by kernel stubs such as the ones in the Linux and NetBSD kernels. > I don't think breaking those would be acceptable, as kernel debugging > is where the segment registers actually matter! That's something I was concerned about. Here is another approach, which adds special handling for those registers for Windows. The issue was that the same code was used for both 32bit and 64bit Windows, so I needed to extend the tdep structure to be able to determine whether register N was a segment register or not. Does the attached patch look good to you? gdb/ChangeLog: * i386-tdep.h (struct gdbarch_tdep): New field `first_segment_regnum'. * amd64-tdep.c (amd64_init_abi): Set tdep->first_segment_regnum. * i386-tdep.c (i386_gdbarch_init): Likewise. * windows-nat.c (do_windows_fetch_inferior_registers): Only read the first 16 bits of segment register values. Tested on x86-windows and x86_64-windows using AdaCore's testsuite. Tested on x86_64-linux with the official testsuite (JIC). Thank you, -- Joel