From: Gary Funck <gary@intrepid.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
Vinay Sridhar <vinay@linux.vnet.ibm.com>,
gdb-patches@sources.redhat.com,
Daniel Jacobowitz <drow@false.org>,
luisgpm@linux.vnet.ibm.com
Subject: Re: [patch] Accessing tls variables across files causes a bug
Date: Tue, 02 Dec 2008 14:53:00 -0000 [thread overview]
Message-ID: <20081202145246.GC15483@intrepid.com> (raw)
In-Reply-To: <200812021352.mB2DqXqT015979@d12av02.megacenter.de.ibm.com>
On 12/02/08 14:52:33, Ulrich Weigand wrote:
> > 2008-12-01 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > Fix resolving external references to TLS variables.
> > * findvar.c: Include `objfiles.h'.
> > (read_var_value <LOC_UNRESOLVED>): New variable `obj_section'. Handle
> > SEC_THREAD_LOCAL variables.
> > * printcmd.c (address_info <LOC_UNRESOLVED>): Handle SEC_THREAD_LOCAL
> > variables.
> >
> > 2008-12-01 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > Test resolving external references to TLS variables.
> > * gdb.threads/tls.exp: New tests to examine A_THREAD_LOCAL and
> > FILE2_THREAD_LOCAL.
> > (testfile2, srcfile2): New variables.
> > * gdb.threads/tls.c (file2_thread_local)
> > (function_referencing_file2_thread_local): New.
> > * gdb.threads/tls2.c: New file.
>
> This is OK. Thanks, Ulrich
If anyone ports this patch to 6.8 or can share what's
needed to implement the patch in 6.8, I'd appreciate
learning about that. I quickly tried it, and it seems
that this part of the fix runs into difficulties:
diff -r1.4 findvar.c
36a37
> #include "objfiles.h"
580a582
> struct obj_section *obj_section;
589a592,596
>
> obj_section = SYMBOL_OBJ_SECTION (msym);
> if (obj_section
> && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
> addr = target_translate_tls_address (obj_section->objfile, addr);
with related difficulties in printcmd.c.
SYMBOL_OBJ_SECTION was introduced in this mod to symtab.h
revision 1.131
date: 2008/09/05 11:37:17; author: uweigand; state: Exp; lines: +17 -15
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
thanks,
- Gary
next prev parent reply other threads:[~2008-12-02 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 4:24 [Fwd: Re: [patch] Re: Accessing tls variables across files causes a bug] Vinay Sridhar
2008-11-27 15:01 ` [patch] Accessing tls variables across files causes a bug Gary Funck
2008-11-27 17:07 ` Jan Kratochvil
2008-12-01 14:15 ` Jan Kratochvil
2008-12-01 18:30 ` Ulrich Weigand
[not found] ` <20081201182931.GA18248@intrepid.com>
2008-12-01 21:54 ` Jan Kratochvil
2008-12-02 13:54 ` Ulrich Weigand
2008-12-02 14:53 ` Gary Funck [this message]
2008-12-02 15:13 ` Jan Kratochvil
2008-12-02 15:40 ` Gary Funck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081202145246.GC15483@intrepid.com \
--to=gary@intrepid.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jan.kratochvil@redhat.com \
--cc=luisgpm@linux.vnet.ibm.com \
--cc=uweigand@de.ibm.com \
--cc=vinay@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox