From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30071 invoked by alias); 20 Aug 2013 11:44:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30056 invoked by uid 89); 20 Aug 2013 11:44:25 -0000 X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD autolearn=ham version=3.3.2 Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 20 Aug 2013 11:44:24 +0000 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Aug 2013 12:39:09 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 20 Aug 2013 12:39:08 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 631541B0805D for ; Tue, 20 Aug 2013 12:44:21 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7KBi8mZ48889898 for ; Tue, 20 Aug 2013 11:44:08 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7KBiIqj031416 for ; Tue, 20 Aug 2013 05:44:19 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-143.boeblingen.de.ibm.com [9.152.212.143]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r7KBiIPD031407; Tue, 20 Aug 2013 05:44:18 -0600 From: Andreas Arnez To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Andreas Krebbel Subject: Re: [PATCH] Skip VDSO when reading SO list References: <87d2p9oi4i.fsf@br87z6lw.de.ibm.com> <20130819182907.GA2145@host2.jankratochvil.net> Date: Tue, 20 Aug 2013 11:44:00 -0000 In-Reply-To: <20130819182907.GA2145@host2.jankratochvil.net> (Jan Kratochvil's message of "Mon, 19 Aug 2013 20:29:07 +0200") Message-ID: <87wqngfuy5.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13082011-2966-0000-0000-00000882053F X-SW-Source: 2013-08/txt/msg00536.txt.bz2 Jan Kratochvil writes: > On Mon, 19 Aug 2013 16:44:13 +0200, Andreas Arnez wrote: >> On some Linux versions, the file name (l_name) of a VDSO's link map >> entry lies in read-only memory that is excluded from a core dump. >> When reading such a core dump, GDB complains: >> >> warning: Can't read pathname for load map: Input/output error. > > I believe the right fix is in glibc instead: > [patch] Fix vDSO l_name for GDB's: Can't read pathname for load map:Input/output error. > http://sourceware.org/ml/libc-alpha/2009-10/msg00001.html > Message-ID: <20091004161706.GA27450@host0.dyn.jankratochvil.net> > > Could you verify it works for you so that we could possibly ping it? This patch doesn't apply anymore, because the glibc code has been restructured, e.g. the vdso logic is now separated out in elf/setup-vdso.h. Maybe the following patch would nowadays do the trick. diff --git a/elf/dl-object.c b/elf/dl-object.c index 0f594d2..de142de 100644 --- a/elf/dl-object.c +++ b/elf/dl-object.c @@ -62,6 +62,7 @@ _dl_new_object (char *realname, const char *libname, int type, size_t libname_len = strlen (libname) + 1; struct link_map *new; struct libname_list *newname; + static char rw_empty_string[] = { 0 }; #ifdef SHARED /* We create the map for the executable before we know whether we have auditing libraries and if yes, how many. Assume the worst. */ @@ -88,7 +89,7 @@ _dl_new_object (char *realname, const char *libname, int type, /* newname->next = NULL; We use calloc therefore not necessary. */ newname->dont_free = 1; - new->l_name = realname; + new->l_name = *realname ? realname : rw_empty_string; new->l_type = type; /* If we set the bit now since we know it is never used we avoid dirtying the cache line later. */