This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Invalid segment resister value on x86_64-windows
> Hmm, it should be possible to do this without changing any of the
> -tdep.c code, but if you prefer to do it this way, can you rename the
> new field into cs_regnum, change the comment into "Register number for
> %cs", and move it somewhere around the other _regnum variables that
> are already part of the struct? That makes things a bit more
> consistent.
If you prefer, I can do something similar to what we do to handle
the register mapping. Attached is a patch that does that, and only
touches windows *-nat code. Untested for now; will test and add
a ChangeLog if this is your prefered approach.
This can be simplified a little further and have everything done
in windows-nat.c, but it would probably be considered uglier:
include "i386-tdep.h" and "amd64-tdep.h" in windows-nat.c, and
then have a quick check to determine which platform we are, and
then set then implement the segment_register_p function using either
a check on sizeof (void *), or a #ifdef [...] #else [...]...
--
Joel