From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19474 invoked by alias); 24 Sep 2013 18:08:28 -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 19462 invoked by uid 89); 24 Sep 2013 18:08:27 -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; Tue, 24 Sep 2013 18:08:27 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8OI7Jka003049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Sep 2013 14:07:19 -0400 Received: from host2.jankratochvil.net (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8OI7FfD019445 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 24 Sep 2013 14:07:18 -0400 Date: Tue, 24 Sep 2013 18:08:00 -0000 From: Jan Kratochvil To: Andreas Arnez Cc: gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [PATCH v2] Skip vDSO when reading SO list (PR 8882) Message-ID: <20130924180715.GA18842@host2.jankratochvil.net> References: <87eh8ep0wy.fsf@br87z6lw.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eh8ep0wy.fsf@br87z6lw.de.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00877.txt.bz2 On Tue, 24 Sep 2013 19:47:09 +0200, Andreas Arnez wrote: > ChangeLog: > 2013-09-24 Andreas Arnez > Add here line: PR shlibs/8882 > * solib-svr4.c (svr4_read_so_list): Skip the vDSO when reading > link map entries. > > testsuite/ChangeLog: > 2013-09-24 Andreas Arnez > Add here line: PR shlibs/8882 > * gdb.base/corefile.exp: Add a check to assure warning-free > core-file load. OK to check it in with a little update below: > @@ -1359,8 +1361,16 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD > SO_NAME_MAX_PATH_SIZE - 1, &errcode); > if (errcode != 0) > { > - warning (_("Can't read pathname for load map: %s."), > - safe_strerror (errcode)); > + /* If this entry's l_name address matches that of the > + inferior executable, then this is not a normal shared > + object, but (most likely) a vDSO. In this case, silently > + skip it; otherwise emit a warning. */ > + if (! (first != NULL > + && new->lm_info->l_name == first->lm_info->l_name)) Nested negations were not accepted for GDB before, therefore: if (first == NULL || new->lm_info->l_name != first->lm_info->l_name) (I agree it had some logic but this was a general GDB list consensus.) > + { Excessive curly braces. > + warning (_("Can't read pathname for load map: %s."), > + safe_strerror (errcode)); > + } > do_cleanups (old_chain); > continue; > } Thanks, Jan