diff options
author | Roland McGrath <roland@redhat.com> | 2009-11-22 20:42:53 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2009-12-09 01:01:28 -0800 |
commit | 6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd (patch) | |
tree | f1ca70b5d1c32d593b0c2e825f10c56b49d14c06 /nptl_db/thread_dbP.h | |
parent | ee1a7fabb4e0abd3e73e828ce326dcb5fd38b874 (diff) | |
download | glibc-roland/nptl_db.zip glibc-roland/nptl_db.tar.gz glibc-roland/nptl_db.tar.bz2 |
Make libthread_db work without libpthread, just enough for TLS decoding.roland/nptl_db
Diffstat (limited to 'nptl_db/thread_dbP.h')
-rw-r--r-- | nptl_db/thread_dbP.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h index e5db9bf..6d0e91d 100644 --- a/nptl_db/thread_dbP.h +++ b/nptl_db/thread_dbP.h @@ -1,5 +1,5 @@ /* Private header for thread debug library - Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2003,2004,2007,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -140,16 +140,16 @@ ta_ok (const td_thragent_t *ta) /* Internal wrapper around ps_pglobal_lookup. */ -extern ps_err_e td_lookup (struct ps_prochandle *ps, - int idx, psaddr_t *sym_addr) attribute_hidden; - - +extern ps_err_e td_lookup_1 (struct ps_prochandle *ps, int idx, + psaddr_t *sym_addr, bool rtld) attribute_hidden; +#define td_lookup(ta, idx, sym_addr) \ + td_lookup_1 ((ta)->ph, idx, sym_addr, (ta)->ta_addr_nptl_version == 0) /* Store in psaddr_t VAR the address of inferior's symbol NAME. */ #define DB_GET_SYMBOL(var, ta, name) \ (((ta)->ta_addr_##name == 0 \ - && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ + && td_lookup ((ta), SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ ? TD_ERR : ((var) = (ta)->ta_addr_##name, TD_OK)) /* Store in psaddr_t VAR the value of ((TYPE) PTR)->FIELD[IDX] in the inferior. @@ -181,7 +181,7 @@ extern td_err_e _td_locate_field (td_thragent_t *ta, A target value smaller than psaddr_t is zero-extended. */ #define DB_GET_VALUE(var, ta, name, idx) \ (((ta)->ta_addr_##name == 0 \ - && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ + && td_lookup ((ta), SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ ? TD_ERR \ : _td_fetch_value ((ta), (ta)->ta_var_##name, SYM_DESC_##name, \ (psaddr_t) 0 + (idx), (ta)->ta_addr_##name, &(var))) @@ -213,7 +213,7 @@ extern td_err_e _td_fetch_value_local (td_thragent_t *ta, A target field smaller than psaddr_t is zero-extended. */ #define DB_PUT_VALUE(ta, name, idx, value) \ (((ta)->ta_addr_##name == 0 \ - && td_lookup ((ta)->ph, SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ + && td_lookup ((ta), SYM_##name, &(ta)->ta_addr_##name) != PS_OK) \ ? TD_ERR \ : _td_store_value ((ta), (ta)->ta_var_##name, SYM_DESC_##name, \ (psaddr_t) 0 + (idx), (ta)->ta_addr_##name, (value))) @@ -254,4 +254,6 @@ extern td_err_e _td_check_sizeof (td_thragent_t *ta, uint32_t *sizep, extern td_err_e __td_ta_lookup_th_unique (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th); +extern td_err_e _td_ta_check_nptl (td_thragent_t *ta) attribute_hidden; + #endif /* thread_dbP.h */ |