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/symtab.h | |
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/symtab.h')
-rw-r--r-- | gdb/symtab.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 520e81e..b84cac6 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -629,6 +629,14 @@ enum address_class LOC_HP_THREAD_LOCAL_STATIC, + /* Value is at a thread-specific location calculated by a + target-specific method. SYMBOL_OBJFILE gives the object file + in which the symbol is defined; the symbol's value is the + offset into that objfile's thread-local storage for the current + thread. */ + + LOC_THREAD_LOCAL_STATIC, + /* The variable does not actually exist in the program. The value is ignored. */ @@ -698,6 +706,12 @@ struct symbol { /* Used by LOC_BASEREG and LOC_BASEREG_ARG. */ short basereg; + + /* Used by LOC_THREAD_LOCAL_STATIC. The objfile in which this + symbol is defined. To find a thread-local variable (e.g., a + variable declared with the `__thread' storage class), we may + need to know which object file it's in. */ + struct objfile *objfile; } aux_value; @@ -719,6 +733,7 @@ struct symbol #define SYMBOL_TYPE(symbol) (symbol)->type #define SYMBOL_LINE(symbol) (symbol)->line #define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg +#define SYMBOL_OBJFILE(symbol) (symbol)->aux_value.objfile #define SYMBOL_ALIASES(symbol) (symbol)->aliases #define SYMBOL_RANGES(symbol) (symbol)->ranges |