This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[resolved] Re: [patch] Re: Accessing tls variables across files causes a bug
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Vinay Sridhar <vinay at linux dot vnet dot ibm dot com>, Daniel Jacobowitz <drow at false dot org>, luisgpm at linux dot vnet dot ibm dot com, uweigand at de dot ibm dot com, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 12 Jun 2009 19:05:53 +0200
- Subject: [resolved] Re: [patch] Re: Accessing tls variables across files causes a bug
- References: <1217480020.4755.1.camel@vinaysridhar.in.ibm.com> <20080802171807.GA2755@host0.dyn.jankratochvil.net> <1217925527.3658.41.camel@vinaysridhar.in.ibm.com> <20080805122118.GB17219@caradoc.them.org> <1218021410.13466.4.camel@vinaysridhar.in.ibm.com> <20080806114241.GA18923@host0.dyn.jankratochvil.net> <20080806151933.GA32530@host0.dyn.jankratochvil.net>
Hi,
just marking this mail thread as resolved by later mail threads:
The TLS TLS cross-file references fix got checked-in by:
Re: [patch] Accessing tls variables across files causes a bug
http://sourceware.org/ml/gdb-patches/2008-12/msg00016.html
http://sourceware.org/ml/gdb-cvs/2008-12/msg00009.html
Why LOC_UNRESOLVED existence makes sense for GDB (testcase on it):
Re: [patch] Fix C `extern' shadowing in a local block
http://sourceware.org/ml/gdb-patches/2009-04/msg00051.html
http://sourceware.org/ml/gdb-cvs/2009-04/msg00021.html
Thanks,
Jan
On Wed, 06 Aug 2008 17:19:33 +0200, Jan Kratochvil wrote:
> On Wed, 06 Aug 2008 13:42:41 +0200, Jan Kratochvil wrote:
> > Another possibility is that LOC_UNRESOLVED may no longer be needed for recent
> > gcc debuginfos always(?) containting `DW_AT_location's, therefore we would not
> > have to deal with `minimal_symbol's in this case at all.
>
> Attached.
>
> It has no regressions on x86_64, Fedora gcc-4.3.1-6.x86_64 (but gcc-4.3 has
> GDB regressions against gcc-4.1). Also tried there are no regressions by
> check//unix/-gstabs+ (although the three new TLS testcases FAIL there).
>
> I do not fully grok why psymtabs were created for DW_AT_type DIEs with no
> DW_AT_location. IMO (DW_AT_location || DW_AT_const_value) is the right
> condition (DW_AT_const_value requirement was found by a testsuite run).
>
>
> Regards,
> Jan
> 2008-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Fix resolving external references to TLS variables.
> * ada-lang.c (ada_add_block_symbols): Remove LOC_UNRESOLVED.
> * ax-gdb.c (gen_var_ref): Likewise.
> * gen_var_ref (symbol_read_needs_frame, read_var_value): Likewise.
> * m2-exp.y (yylex): Likewise.
> * printcmd.c (address_info): Likewise.
> * symmisc.c (print_symbol, print_partial_symbols): Likewise.
> * symtab.h (enum address_class): Likewise.
> * tracepoint.c (collect_symbol, scope_info): Likewise.
> * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
> * stabsread.c (scan_file_globals): Complain even on LOC_STATIC symbols.
> Set such symbols to LOC_UNDEF instead of LOC_UNRESOLVED.
> * dwarf2read.c (struct partial_die_info): Remove the field HAS_TYPE.
> New field HAS_CONST_VALUE.
> (add_partial_symbol) <DW_TAG_variable>: HAS_TYPE condition removed.
> HAS_CONST_VALUE condition added. Comment updated.
> (read_partial_die) <DW_AT_type>: Case removed.
> (read_partial_die) <DW_AT_const_value>: New case.
> (new_symbol): Remove setting LOC_UNRESOLVED. Comment updated.
>
> 2008-08-06 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Update for removed LOC_UNRESOLVED, test resolving external references
> to TLS variables.
> * gdb.dwarf2/dw2-noloc.S: New variable "optloc".
> * gdb.dwarf2/dw2-noloc.exp: Test the new variable "optloc". Update the
> current message for the variable "noloc".
> * gdb.threads/tls.exp: New tests to print 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.