From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8985 invoked by alias); 15 May 2005 18:36:35 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8849 invoked from network); 15 May 2005 18:36:29 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 15 May 2005 18:36:29 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DXNyP-0004IV-Vu; Sun, 15 May 2005 14:36:22 -0400 Date: Sun, 15 May 2005 19:44:00 -0000 From: Daniel Jacobowitz To: Wu Zhou Cc: pgilliam@us.ibm.com, gdb-patches@sources.redhat.com Subject: Re: [patch] update gdb.base/shreloc.exp to use new shared library infrastructure Message-ID: <20050515183621.GA16399@nevyn.them.org> Mail-Followup-To: Wu Zhou , pgilliam@us.ibm.com, gdb-patches@sources.redhat.com References: <1114922131.42745c938ed3a@imap.linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1114922131.42745c938ed3a@imap.linux.ibm.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00382.txt.bz2 On Sun, May 01, 2005 at 12:35:31AM -0400, Wu Zhou wrote: > > > Can we fix the testcase instead of adding -qdbxextra, by making the > > > variable referenced? Other compilers do the same optimization, and > > > some of them don't have a handy option to preserve the variable. > > > > > > > Is it ok to change the following lines in shreloc1.c/shreloc2.c from: > > > > ATTRIBUTES void fn_1 (int unused) { } > > ATTRIBUTES void fn_2 (int unused) { } > > > > to: > > > > ATTRIBUTES void fn_1 (int refered) { static_var_1 = refered; } > > ATTRIBUTES void fn_2 (int refered) { static_var_2 = refered; } > > > > Please comments. Thanks. > > Here goes the revised patch. Wishing that it will not get mangled any > more. Please review and comments. > > 2005-05-01 Paul Gilliam > Wu Zhou > > * gdb.base/shreloc.exp: Use gdb_compile_shlib. Add support for > IBM's xlc compiler. > * gdb.base/shreloc1.c: Refer variable static_var_1 in fn_1. > * gdb.base/shreloc2.c: Refer variable static_var_2 in fn_2. Sorry about the delay. This patch is OK, but please change two things for me before you commit it: the correct term here is "reference" rather than "refer", and the ChangeLog entry should show where the changes take place. Like so: * gdb.base/shreloc.exp: Use gdb_compile_shlib. Add support for IBM's xlc compiler. * gdb.base/shreloc1.c (fn_1): Reference variable static_var_1. * gdb.base/shreloc2.c (fn_2): Reference variable static_var_2. So with that changelog, and "refered" changed to "referenced" in the patch, it is OK to commit. -- Daniel Jacobowitz CodeSourcery, LLC