From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26120 invoked by alias); 28 Jan 2007 14:02:53 -0000 Received: (qmail 26111 invoked by uid 22791); 28 Jan 2007 14:02:53 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 28 Jan 2007 14:02:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1HBAcF-00023L-4S; Sun, 28 Jan 2007 09:02:43 -0500 Date: Sun, 28 Jan 2007 14:02:00 -0000 From: Daniel Jacobowitz To: Neo Cc: gdb Subject: Re: Failed to read a valid object file image from memory (gdb_6_6-branch, kernel 2.6.20-rc6) Message-ID: <20070128140243.GB7486@nevyn.them.org> Mail-Followup-To: Neo , gdb References: <45BBFAC5.80009@cse.unl.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45BBFAC5.80009@cse.unl.edu> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00341.txt.bz2 On Sat, Jan 27, 2007 at 07:22:13PM -0600, Neo wrote: > On my machine the configure script assumes that I was equipped with > pread64. But I got an EIO from that system call. Then, I disable the > "HAS_PREAD64" macro, I got an invalid argument error from the read > system call. (in file linux-nat.c) > > Now, I am curious about the potential fix for this problem. > > 1) Regardless the HAS_PREAD64 macro, it seems that it will definitely > fail on 32bit machine without large offset support due to that large > offset as 0xFFFE0000. > 2) For those machines probably configured with pread64, it seems that > the function does not working well. At least the checking in the > ./gdb/configure is not that strict. No - these shouldn't matter. Glibc is supposed to support pread64 even if the syscall is missing. We're just making sure the system library has compile time support for pread64; runtime support is its responsibility. See __emulate_pread64 in glibc. > 3) Can we just drop the AT_SYSINFO_EHDR that we found in function > add_vsyscall_page? I suspect it's actually a kernel bug that you can't read the vsyscall page. You should be able to; for instance, I can using 32-bit emulation on a 64-bit system. Unfortunately, I don't have a 32-bit kernel running anywhere I can test. -- Daniel Jacobowitz CodeSourcery