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


Quoting Daniel Jacobowitz <drow@false.org>:

> This does not be long in the changelog, only in the comments.  The
> ChangeLog for this patch should look like:
> 
> 2005-04-29  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.
> 
> If you're going to post patches to this list, please find a mail client
> which does not mangle line wrapping; the patch as I received it is hard
> to read and can not be applied.

Sorry, wish that this time it is ok.

> OK, now I understand why you needed the options.  We will need
> -qstatsym; here's a better description:
> 
>   # IBM's xlc compiler does not add static variables to the ELFe symbol
>   # table by default.  We need this option to make the variables show
>   # up in "maint print msymbols".
> 
> 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.

Cheers
- Wu Zhou


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