Whacky ia64: linux_proc_xfer_partial and lseek vs pread64
Andreas Schwab
schwab@suse.de
Fri Feb 10 18:05:00 GMT 2006
David Lecomber <david@lecomber.net> writes:
> Dear Dan and all,
>
> It's great that these days we use file access to get at the memory via
> the /proc filesystem - but there's an interesting sighting on the ia64
> (suse 9) in linux_proc_xfer_partial.
>
> #ifdef HAVE_PREAD64
> if (pread64 (fd, readbuf, len, offset) != len)
> #else
> if (lseek (fd, offset, SEEK_SET) == -1 || read (fd, readbuf, len) !=
> len)
> #endif
> ret = 0;
> else
> ret = len;
>
>
> So, Mr Itanium has pread64, it calls pread64.. it seems to fail
> regularly.. As the strace log shows.
pread and lseek with SEEK_SET do not allow negative offsets. lseek on
/proc/$$/mem is a special exception.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gdb
mailing list