From e0740f779c1471fbc565ceedae93dea09bc0eadf Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 2 Dec 2008 14:51:01 +0000 Subject: gdb/ Fix resolving external references to TLS variables. * findvar.c: Include `objfiles.h'. (read_var_value ): New variable `obj_section'. Handle SEC_THREAD_LOCAL variables. * printcmd.c (address_info ): Handle SEC_THREAD_LOCAL variables. gdb/testsuite/ 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. --- gdb/testsuite/gdb.threads/tls.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/testsuite/gdb.threads/tls.c') diff --git a/gdb/testsuite/gdb.threads/tls.c b/gdb/testsuite/gdb.threads/tls.c index 9b2145e..8f2443c 100644 --- a/gdb/testsuite/gdb.threads/tls.c +++ b/gdb/testsuite/gdb.threads/tls.c @@ -20,6 +20,9 @@ __thread int a_thread_local; __thread int another_thread_local; +/* psymtabs->symtabs resolving check. */ +extern __thread int file2_thread_local; + /* Global variable just for info addr in gdb. */ int a_global; @@ -119,6 +122,12 @@ void *spin( vp ) } void +function_referencing_file2_thread_local (void) +{ + file2_thread_local = file2_thread_local; +} + +void do_pass() { int i; -- cgit v1.1