From: John Baldwin <jhb@FreeBSD.org>
To: Rajendra SY <rajendra.sy@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [PR 23660] On FreeBSD platform missing implementation of thread-db support
Date: Mon, 17 Sep 2018 17:11:00 -0000 [thread overview]
Message-ID: <8b47dccf-0b34-9803-8417-42841dd924a7@FreeBSD.org> (raw)
In-Reply-To: <CAMAnt0=fYErrp--45kinNV1yx-FxP1hnqOCC_kuMt79vES5ROA@mail.gmail.com>
On 9/15/18 6:21 AM, Rajendra SY wrote:
> Problem:
> Missing libthread_db integration with GDB
>
> Cause:
> GDB missing libthread_db integration on FreeBSD target because of this
> GDB failed to access TLS variable values.
>
> Tests failed:
> - gdb.threads/tls-shared.exp
> - gdb.threads/tls-nodebug-pie.exp
> - gdb.threads/tls-so_extern.exp
> - gdb.threads/tls-var.exp
> - gdb.threads/tls.exp
> - gdb.threads/tls-core.exp
I'll have to take some time to review this. I had hoped to avoid using
libthread_db at all on FreeBSD (it doesn't support AVX or 32-bit processes
on 64-bit kernels, etc.). For TLS I was planning on teaching fbsd-tdep.c
about the various special variables libthread_db knows from rtld and libthr
and using that along with having each FreeBSD architecture provide the
thread pointer register to implement TLS.
We could instead use libthread_db for now, but if so I'd prefer to only use
libthread_db for TLS and not for anything else. This means that in theory
much of the proc-service API can be stubs that should never be called.
I would also be tempted to not have a separate thread-stratum target at all,
but just have the native target in fbsd-nat.c call into fbsd-thread-db as if
it was just a library for things like extra thread info (the pthread_t
pointer value) and TLS.
--
John Baldwin
                                                                           Â
next prev parent reply other threads:[~2018-09-17 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 13:21 Rajendra SY
2018-09-17 17:11 ` John Baldwin [this message]
2018-09-19 16:52 ` Rajendra SY
2018-09-19 16:59 ` Pedro Alves
2018-09-20 4:38 ` Rajendra SY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b47dccf-0b34-9803-8417-42841dd924a7@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
--cc=rajendra.sy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).