diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-10-21 19:11:50 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-10-21 19:11:50 +0000 |
commit | 9d774e4455679ce9e35acbcb9abb6704b49cc47f (patch) | |
tree | 5bd8dec8d997bd0bdff259ece2d83a7d7699974f /gdb/findvar.c | |
parent | 550633cbb18aeb803651d019c5b08a32d270aaf4 (diff) | |
download | gdb-9d774e4455679ce9e35acbcb9abb6704b49cc47f.zip gdb-9d774e4455679ce9e35acbcb9abb6704b49cc47f.tar.gz gdb-9d774e4455679ce9e35acbcb9abb6704b49cc47f.tar.bz2 |
2002-10-21 Jim Blandy <jimb@redhat.com>
Elena Zannoni <ezannoni@redhat.com>
* symtab.h (address_class): Re-add LOC_THREAD_LOCAL_STATIC
for thread local storage locations.
(struct symbol): Add objfile field.
(SYMBOL_OBJFILE): Define.
* dwarf2read.c (is_thread_local): New static variable.
(new_symbol): If variable is in thread local fill in address class
and objfile appropriately.
(decode_locdesc): Recognize and handle DW_OP_GNU_push_tls_address
stack operation.
* printcmd.c (address_info): Print the information for thread
local storage variable.
* findvar.c (read_var_value): In case of thread local variable,
defer to the target vector code to compute address.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index e48ccc6..9eff168 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -542,6 +542,23 @@ addresses have not been bound by the dynamic loader. Try again when executable i break; } + case LOC_THREAD_LOCAL_STATIC: + { + /* We want to let the target / ABI-specific code construct + this value for us, so we need to dispose of the value + allocated for us above. */ + if (target_get_thread_local_address_p ()) + addr = target_get_thread_local_address (inferior_ptid, + SYMBOL_OBJFILE (var), + SYMBOL_VALUE_ADDRESS (var)); + /* It wouldn't be wrong here to try a gdbarch method, too; + finding TLS is an ABI-specific thing. But we don't do that + yet. */ + else + error ("Cannot find thread-local variables on this target"); + break; + } + case LOC_TYPEDEF: error ("Cannot look up value of a typedef"); break; |