This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
- From: Jim Wilson <jimw at sifive dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Palmer Dabbelt <palmer at dabbelt dot com>
- Date: Thu, 12 Jul 2018 15:02:19 -0700
- Subject: Re: [PATCH] RISC-V: Don't use ps_get_thread_area in libthread_db (bug 23402)
- References: <firstname.lastname@example.org>
On Thu, Jul 12, 2018 at 12:24 AM, Andreas Schwab <email@example.com> wrote:
> 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 looks good to me, just comparing with other glibc ports that have
tp in a register. I'm not listed as one of the RISC-V port
maintainers though, but not sure if that matters. Unfortunately, I
wasn't expecting to need glibc patches as part of my gdb porting
effort, so I don't have an easy way to test this myself at the moment.
I will have to extend my gdb testing setup to include support for