From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9621 invoked by alias); 8 Jul 2013 06:50:57 -0000 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 Received: (qmail 9597 invoked by uid 89); 8 Jul 2013 06:50:52 -0000 X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TW_BF,TW_RW,TW_WX,TW_XF autolearn=ham version=3.3.1 Received: from mail-oa0-f45.google.com (HELO mail-oa0-f45.google.com) (209.85.219.45) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Jul 2013 06:50:51 +0000 Received: by mail-oa0-f45.google.com with SMTP id j1so5765493oag.4 for ; Sun, 07 Jul 2013 23:50:49 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.128.42 with SMTP id nl10mr18874574obb.41.1373266249471; Sun, 07 Jul 2013 23:50:49 -0700 (PDT) Received: by 10.182.21.169 with HTTP; Sun, 7 Jul 2013 23:50:49 -0700 (PDT) In-Reply-To: <20130705184238.GA661@host2.jankratochvil.net> References: <20130703084207.GA598@host2.jankratochvil.net> <20130703090259.GA1854@host2.jankratochvil.net> <20130703144857.GA27367@host2.jankratochvil.net> <20130704061052.GA19661@host2.jankratochvil.net> <20130705184238.GA661@host2.jankratochvil.net> Date: Mon, 08 Jul 2013 06:50:00 -0000 Message-ID: Subject: Re: Fwd: vdso From: vijay nag To: Jan Kratochvil Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-07/txt/msg00034.txt.bz2 On Sat, Jul 6, 2013 at 12:12 AM, Jan Kratochvil wrote: > On Fri, 05 Jul 2013 08:12:29 +0200, vijay nag wrote: >> The function linux_proc_xfer_partial() is returning result zero when >> trying to pread64 /proc//mem and errno is set to -EIO. > > And what is 'offset' (and 'len') that time and what is in /proc/PID/maps that > time? > Isn't there also some incorrect signed extension of 32-bit address to 64-bit > address, for example? > > >> Does that mean kernel doesn't support pread64 on /proc/xxx/mem files ? > > I do not think so. > > > Jan Well the problem is not with pread64 and the same problem is observed with (lseek, read) pair. Offset 0xffffe000 doesn't correspond to any mapping in the process address space and probably is that reason why read is returning EIO ? Breakpoint 1, linux_proc_xfer_partial (ops=0x8499230, object=TARGET_OBJECT_MEMORY, annex=0x0, readbuf=0xbffff250 "\r", writebuf=0x0, offset=4294967296, len=4294959104) at linux-nat.c:4386 4386 if (object != TARGET_OBJECT_MEMORY || !readbuf) (gdb) p /x offset $3 = 0xffffe000 (gdb) p /x len $4 = 0x34 (gdb) smap details of VDSO b7fff000-b8000000 r-xp b7fff000 00:00 0 [vdso] Size: 4 kB Rss: 0 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB /proc/xxx/maps 08048000-1829a000 r-xp 00000000 00:15 85524508 vdso_trial 1829a000-1befa000 rwxp 10252000 00:15 85524508 vdso_trial 1befa000-1dea0000 rwxp 1befa000 00:00 0 [heap] b7fff000-b8000000 r-xp b7fff000 00:00 0 [vdso] bffeb000-c0000000 rwxp bffeb000 00:00 0 [stack]