[rfa] Add 32 bit (i386) support to x86-64-pc-linux-gnu

Andrew Cagney ac131313@redhat.com
Fri Aug 1 15:16:00 GMT 2003


> Hello,
> 
> This patch gets 32 (i386) debugging working with an x86-64-pc-linux-gnu configured GDB.
> 
> I should note that there are several ways of doing this.  The attached uses the technique of modifying x86-64 linux nat/tdep files so that they can supply values to either a 32 or 64 bit formatted register cache.
> 
> I know of two problems:
> 
> - corefiles
> I noticed a combination of problems: i386 linux core file support is in i386-linux-nat.c so isn't linked into x86-64; x86-64-linux-tdep does include core file support but it fails to "do the right thing" with 32 bit core files (it should either reject it, or handle it completly).
> 
> - threads
> The 64 bit libthread db gets loaded, it doesn't recognize the 32 bit libthread db target.  The glibc maintainers know about this problem.
> 
> BTW, it also fixes a problem with the old code, the original map table included "CS" and "SS" but x86-64-pc-linux-gnu doesn't.
> 
> Thoughts?  6.0?

Attached is an update.  It now also fixes x86-64 part of the core-file 
problem.  The x86-64 code will only load an x86-64 corefile.

I'll follow up with a separate patch that lets x86-64 GDB load i386 core 
files.

thoughts?
Andrew

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030801/08aaa4b1/attachment.ksh>


More information about the Gdb-patches mailing list