This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] update gdb.base/shreloc.exp to use new shared library infrastructure


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  <pgilliam@us.ibm.com> 
>             Wu Zhou   <woodzltc@cn.ibm.com> 
> 
>         * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]