mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 19:53:32 +08:00
RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
Since RISC-V stores the thread pointer in a general register libthread_db can just ask the debugger for the register contents instead of trying to call ps_get_thread_area. This enables thread debugging in gdb. * sysdeps/riscv/nptl/tls.h (DB_THREAD_SELF): Use REGISTER instead of CONST_THREAD_AREA.
This commit is contained in:
parent
fb4c32aef6
commit
92a4cba760
@ -1,3 +1,8 @@
|
||||
2018-08-06 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* sysdeps/riscv/nptl/tls.h (DB_THREAD_SELF): Use REGISTER instead
|
||||
of CONST_THREAD_AREA.
|
||||
|
||||
2018-08-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86/cpu-features.h (STATE_SAVE_OFFSET): Removed.
|
||||
|
@ -99,9 +99,10 @@ typedef struct
|
||||
# define TLS_DEFINE_INIT_TP(tp, pd) \
|
||||
void *tp = (void *) (pd) + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE
|
||||
|
||||
/* Magic for libthread_db to know how to do THREAD_SELF. */
|
||||
/* Informs libthread_db that the thread pointer is register 4, which is used
|
||||
* to know how to do THREAD_SELF. */
|
||||
# define DB_THREAD_SELF \
|
||||
CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
|
||||
REGISTER (64, 64, 4 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
|
||||
|
||||
/* Access to data in the thread descriptor is easy. */
|
||||
# define THREAD_GETMEM(descr, member) \
|
||||
|
Loading…
Reference in New Issue
Block a user