From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13008 invoked by alias); 20 Sep 2013 13:15:58 -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 12985 invoked by uid 89); 20 Sep 2013 13:15:57 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2013 13:15:57 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8KDFrZg021564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Sep 2013 09:15:53 -0400 Received: from host2.jankratochvil.net (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8KDFoTt024880 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 20 Sep 2013 09:15:52 -0400 Date: Fri, 20 Sep 2013 13:15:00 -0000 From: Jan Kratochvil To: Andreas Arnez Cc: gdb-patches@sourceware.org, Andreas Krebbel Subject: Re: [PATCH] Skip VDSO when reading SO list Message-ID: <20130920131549.GA18629@host2.jankratochvil.net> References: <87d2p9oi4i.fsf@br87z6lw.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d2p9oi4i.fsf@br87z6lw.de.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00765.txt.bz2 On Mon, 19 Aug 2013 16:44:13 +0200, Andreas Arnez wrote: > 2013-08-19 Andreas Arnez > > * solib-svr4.c (svr4_read_so_list): Skip the VDSO when reading vDSO > link map entries. Could you include here the testcase from: http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-core-open-vdso-warning.patch > Index: gdb/gdb/solib-svr4.c > =================================================================== > --- gdb.orig/gdb/solib-svr4.c > +++ gdb/gdb/solib-svr4.c > @@ -1310,6 +1310,7 @@ static int > svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, > struct so_list ***link_ptr_ptr, int ignore_first) > { > + struct so_list *first = NULL; > CORE_ADDR next_lm; > > for (; lm != 0; prev_lm = lm, lm = next_lm) > @@ -1349,10 +1350,22 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD > { > struct svr4_info *info = get_svr4_info (); > > + first = new; > info->main_lm_addr = new->lm_info->lm_addr; > do_cleanups (old_chain); > continue; > } > + > + /* The l_name of a VDSO sometimes lies in read-only memory that vDSO > + is excluded from a core dump. In order to avoid the "can't > + read pathname" warning, we try to identify the VDSO. One vDSO > + criteria is that the l_name address matches that of the main > + executable. */ > + if (first && new->lm_info->l_name == first->lm_info->l_name) Here should be also '&& ignore_first'. > + { > + do_cleanups (old_chain); > + continue; > + } And move this block below so that the condition is evaluated only if target_read_string has really failed. The purpose is that no workarounds should complicate the code in the case the system components are already bug-free (after glibc gets fixed). > > /* Extract this shared object's name. */ > target_read_string (new->lm_info->l_name, &buffer, Please make one new post after the updates. Thanks, Jan