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