Get core dumping working again - the architecture specific code that 
was in the sigframe module has been moved into the coredump module 
where it belongs and things fixed up to compiler again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4970 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 53559af..8c299e5 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -114,7 +114,7 @@
 OffT VG_(lseek) ( Int fd, OffT offset, Int whence )
 {
    SysRes res = VG_(do_syscall3)(__NR_lseek, fd, offset, whence);
-   return res.isError ? (-1) : 0;
+   return res.isError ? (-1) : res.val;
    /* if you change the error-reporting conventions of this, also
       change VG_(pread) and all other usage points. */
 }
@@ -278,7 +278,7 @@
 SysRes VG_(pread) ( Int fd, void* buf, Int count, Int offset )
 {
    OffT off = VG_(lseek)( fd, (OffT)offset, VKI_SEEK_SET);
-   if (off != 0)
+   if (off < 0)
       return VG_(mk_SysRes_Error)( VKI_EINVAL );
    return VG_(do_syscall3)(__NR_read, fd, (UWord)buf, count );
 }