From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24451 invoked by alias); 9 Mar 2006 00:20:35 -0000 Received: (qmail 24443 invoked by uid 22791); 9 Mar 2006 00:20:34 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Mar 2006 00:20:31 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k290KS9q022460; Wed, 8 Mar 2006 19:20:28 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k290KS120431; Wed, 8 Mar 2006 19:20:28 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (vpn50-9.rdu.redhat.com [172.16.50.9]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id k290KRxf021577; Wed, 8 Mar 2006 19:20:27 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (free.oliva.athome.lsd.ic.unicamp.br [127.0.0.1]) by free.oliva.athome.lsd.ic.unicamp.br (8.13.5/8.13.5) with ESMTP id k290KPiS032289; Wed, 8 Mar 2006 21:20:25 -0300 Received: (from aoliva@localhost) by free.oliva.athome.lsd.ic.unicamp.br (8.13.5/8.13.5/Submit) id k290KOOg032288; Wed, 8 Mar 2006 21:20:24 -0300 To: gdb-patches@sourceware.org Subject: Re: Prelink.exp troubles References: <20060301200540.GE6465@nevyn.them.org> <20060304151105.GE20187@nevyn.them.org> <20060307172307.GA1474@nevyn.them.org> From: Alexandre Oliva Date: Thu, 09 Mar 2006 04:40:00 -0000 In-Reply-To: <20060307172307.GA1474@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 7 Mar 2006 12:23:08 -0500") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.18 (linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00132.txt.bz2 --=-=-= Content-length: 549 On Mar 7, 2006, Daniel Jacobowitz wrote: > On Tue, Mar 07, 2006 at 02:02:40AM -0300, Alexandre Oliva wrote: >> Here's what I'm checking in, in the hopes that the archoring you >> suggested above is not needed, otherwise I'll take care of it in a >> subsequent patch. > Please fix the anchoring. In the following patch, that I'm checking in as obvious, I fix anchoring and also tidy up some code added in the original prelink patch, such that it's absolutely obvious that the l_addr field is properly initialized in all cases. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gdb-prelink-tweak-more.patch Content-length: 1972 for gdb/ChangeLog from Alexandre Oliva * solib-svr4.c (svr4_current_sos): Move up initialization of l_addr, such that it clearly covers all cases. for gdb/testsuite/ChangeLog from Alexandre Oliva * gdb.base/prelink.exp: Anchor tested-for regular expression on gdb prompt. Index: gdb/solib-svr4.c =================================================================== RCS file: /cvs/src/src/gdb/solib-svr4.c,v retrieving revision 1.56 diff -u -p -r1.56 solib-svr4.c --- gdb/solib-svr4.c 28 Feb 2006 04:28:47 -0000 1.56 +++ gdb/solib-svr4.c 9 Mar 2006 00:07:26 -0000 @@ -704,6 +704,7 @@ svr4_current_sos (void) new->lm_info = xmalloc (sizeof (struct lm_info)); make_cleanup (xfree, new->lm_info); + new->lm_info->l_addr = (CORE_ADDR)-1; new->lm_info->lm = xzalloc (lmo->link_map_size); make_cleanup (xfree, new->lm_info->lm); @@ -744,8 +745,6 @@ svr4_current_sos (void) free_so (new); else { - new->lm_info->l_addr = (CORE_ADDR)-1; - new->next = 0; *link_ptr = new; link_ptr = &new->next; Index: gdb/testsuite/gdb.base/prelink.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/prelink.exp,v retrieving revision 1.2 diff -u -p -r1.2 prelink.exp --- gdb/testsuite/gdb.base/prelink.exp 7 Mar 2006 05:05:29 -0000 1.2 +++ gdb/testsuite/gdb.base/prelink.exp 9 Mar 2006 00:07:26 -0000 @@ -103,8 +103,9 @@ gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} set test "prelink" +global gdb_prompt gdb_test_multiple "core-file $objdir/$subdir/prelink.core" "$test" { - -re "warning: \.dynamic section.*not at the expected address.*warning: difference.*caused by prelink, adjusting expectations." { + -re "warning: \.dynamic section.*not at the expected address.*warning: difference.*caused by prelink, adjusting expectations.*$gdb_prompt $" { pass "$test" } } --=-=-= Content-length: 249 -- Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/ Secretary for FSF Latin America http://www.fsfla.org/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org} --=-=-=--