Blame SOURCES/gdb-tls-1of2.patch

e1d87d
http://sourceware.org/ml/gdb-patches/2016-10/msg00206.html
e1d87d
Subject: [patch+7.12.1 1/2] Code cleanup: write_exp_msymbol: +is_tls
e1d87d
e1d87d
e1d87d
--XMCwj5IQnwKtuyBG
e1d87d
Content-Type: text/plain; charset=us-ascii
e1d87d
Content-Disposition: inline
e1d87d
e1d87d
Hi,
e1d87d
e1d87d
no functionality change, for patch 2/2.
e1d87d
e1d87d
e1d87d
Jan
e1d87d
e1d87d
--XMCwj5IQnwKtuyBG
e1d87d
Content-Type: text/plain; charset=us-ascii
e1d87d
Content-Disposition: inline; filename="tls1.patch"
e1d87d
e1d87d
gdb/ChangeLog
e1d87d
2016-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
e1d87d
e1d87d
	* parse.c (write_exp_msymbol): New variable is_tls, use it.
e1d87d
e1d87d
--- a/gdb/parse.c
e1d87d
+++ b/gdb/parse.c
e1d87d
@@ -484,6 +484,8 @@ write_exp_msymbol (struct parser_state *ps,
e1d87d
   struct obj_section *section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
e1d87d
   enum minimal_symbol_type type = MSYMBOL_TYPE (msymbol);
e1d87d
   CORE_ADDR pc;
e1d87d
+  const int is_tls = (section != NULL
e1d87d
+		      && section->the_bfd_section->flags & SEC_THREAD_LOCAL);
e1d87d
 
e1d87d
   /* The minimal symbol might point to a function descriptor;
e1d87d
      resolve it to the actual code address instead.  */
e1d87d
@@ -520,7 +522,7 @@ write_exp_msymbol (struct parser_state *ps,
e1d87d
   write_exp_elt_longcst (ps, (LONGEST) addr);
e1d87d
   write_exp_elt_opcode (ps, OP_LONG);
e1d87d
 
e1d87d
-  if (section && section->the_bfd_section->flags & SEC_THREAD_LOCAL)
e1d87d
+  if (is_tls)
e1d87d
     {
e1d87d
       write_exp_elt_opcode (ps, UNOP_MEMVAL_TLS);
e1d87d
       write_exp_elt_objfile (ps, objfile);
e1d87d
e1d87d
--XMCwj5IQnwKtuyBG--
e1d87d