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