summaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-11-12 02:39:41 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-11-12 02:39:41 +0000
commitb68fecf311916a401dc38463bed6c94822fab51d (patch)
treed6b2aadcb6dd367c257738f1954703f0da192299 /gdb/target.h
parent72f894aab5990ff219c34f20f91a693aa7c74cc4 (diff)
downloadgdb-b68fecf311916a401dc38463bed6c94822fab51d.tar.gz
2002-11-11 Elena Zannoni <ezannoni@redhat.com>
* findvar.c (read_var_value): Reenable TLS code. 2002-11-11 Elena Zannoni <ezannoni@redhat.com> Jim Blandy <jimb@redhat.com> * gdb_thread_db.h (enum): Add TD_NOTALLOC. * target.c (update_current_target): Add to_get_thread_local_address. * target.h (to_get_thread_local_address): Export. (target_get_thread_local_address): Define. (target_get_thread_local_address_p): Define. * thread-db.c: Include solib-svr4.h. (td_thr_tls_get_addr_p): Define. (thread_db_load): Get a pointer to td_thr_tls_get_addr. (thread_db_get_thread_local_address): New function. (init_thread_db_ops): Initialize to_get_thread_local_address. * configure.in: Add test for TD_NOTALLOC in thread_db.h. * configure: Regenerate. * config.in: Regenerate.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 18b95b0cea9..5cdb76f387d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -328,6 +328,16 @@ struct target_ops
void *),
void *);
char * (*to_make_corefile_notes) (bfd *, int *);
+
+ /* Return the thread-local address at OFFSET in the
+ thread-local storage for the thread PTID and the shared library
+ or executable file given by OBJFILE. If that block of
+ thread-local storage hasn't been allocated yet, this function
+ may return an error. */
+ CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
+ struct objfile *objfile,
+ CORE_ADDR offset);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -1039,6 +1049,12 @@ extern void (*target_new_objfile_hook) (struct objfile *);
#define target_make_corefile_notes(BFD, SIZE_P) \
(current_target.to_make_corefile_notes) (BFD, SIZE_P)
+/* Thread-local values. */
+#define target_get_thread_local_address \
+ (current_target.to_get_thread_local_address)
+#define target_get_thread_local_address_p() \
+ (target_get_thread_local_address != NULL)
+
/* Hook to call target-dependent code after reading in a new symbol table. */
#ifndef TARGET_SYMFILE_POSTREAD