This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Enable x86 XML target descriptions


On Mon, Feb 22, 2010 at 05:56:58PM +0100, Mark Kettenis wrote:
> I've looked at the Linux kernel sources for the kernel on my
> workstation (2.6.27 in its OpenSUSE incarnation), and the only way to
> distinguish between a 32-bit and a 64-bit process seems to be to
> attempt to write one of the debug address registers with a value
> that's larger than 0xffffffff.  If that fails, you have a 32-bit
> process, otherwise it's a 64-bit process.

Yuck :-(  But I didn't see anything else either.

Is there an eflags bit for this?  Even if so, IIRC, we may not want to
use it; it's possible to run 32-bit code in a 64-bit process and some
overly clever programs may do so.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]