Re: [patch/rfc] gdb: clean up x86 cpuid implementations

Eli Zaretskii
2013-05-06T19:44:29Z

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Mon, 6 May 2013 14:51:24 -0400
>
> We've currently got 3 files doing open coded implementations of cpuid.
> Each has its own set of workarounds and varying levels of how well
> they're written and are generally hardcoded to specific cpuid functions.
> If you try to build the latest gdb as a PIE on an i386 system, the build
> will fail because one of them lacks PIC workarounds (wrt ebx).

Sorry, I don't follow: what workarounds, and why are they needed?

And what's PIE got to do with the go32 target?

The current code in go32-nat.c was tested to work in all the
environments supported by that target, without GPFaulting or
triggering any other disasters. I don't think we have the resources
to repeat all that testing with the new code, which tries to detect
newer CPUs, and so could trigger SIGILL. So I'd like to leave
go32-nat.c alone, if possible.