This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
- From: Andreas Schwab <schwab at suse dot de>
- To: DJ Delorie <dj at redhat dot com>
- Cc: libc-alpha at sourceware dot org, palmer at dabbelt dot com, jimw at sifive dot com
- Date: Mon, 30 Jul 2018 09:48:25 +0200
- Subject: Re: [PATCH] RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
- References: <xnmuuc8dix.fsf@greed.delorie.com>
On Jul 27 2018, DJ Delorie <dj@redhat.com> wrote:
> Andreas Schwab <schwab@suse.de> writes:
>> 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.
>
> I'm OK with this but... will the definition be the same for riscv32 ?
This has only be tested on riscv64. For riscv32 most likely another
REGISTER entry needs to be added.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."