[wip:binutils] Large corefile support

Andrew Cagney ac131313@redhat.com
Fri Jan 16 23:46:00 GMT 2004


On the i386, GDB has problems when a corefile is >2gb.  The problems are 
directly attributable to BFD's use of:
	typedef long file_ptr;
	fseek (FILE *stream, long int offset, int whence)
The attached, when combined with a BFD/GDB configured / built with 
--enable-64-bit-bfd, lets GDB handle corefiles >2gb, per this test:

Of note in the patch are:

- it scatters #ifdef's to handle fseek et.al. variants
Is there a better way of doing this?

- is requires --enable-64-bit-bfd
A 32-bit BFD has a 32-bit signed file_ptr (limiting SEEK_SET to files up 
to 2gb).  I think the only robust way of handling files larger than that 
2gb is to require a 64-bit file_ptr (and hence --enable-64-bit-bfd).

- it turns out that --enable-64-bit-bfd tickles some bugs in GDB's 
thread code :-/

- given a 3gb core file, 32-bit objdump isn't very helpful
objdump prints zero's instead of error for the sections contents :-( 
Someone might want to look at this.

Anyway, is this "in principal" ok for BFD (assuming I can track down the 
regressions :-)?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <https://sourceware.org/pipermail/binutils/attachments/20040116/9fe38506/attachment.ksh>

More information about the Binutils mailing list