This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH v3 5/6] Add support for LWP-based threads on FreeBSD.
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at FreeBSD dot org>, gdb-patches at sourceware dot org, binutils at sourceware dot org, Eli Zaretskii <eliz at gnu dot org>
- Date: Mon, 18 Jan 2016 12:37:26 +0000
- Subject: Re: [PATCH v3 5/6] Add support for LWP-based threads on FreeBSD.
- Authentication-results: sourceware.org; auth=none
- References: <1453084047-16175-1-git-send-email-jhb at FreeBSD dot org> <1453084047-16175-6-git-send-email-jhb at FreeBSD dot org>
Eli, this revision includes NEWS/docs bits.
On 01/18/2016 02:27 AM, John Baldwin wrote:
> Older versions of FreeBSD supported userland threading via a pure
> user-space threading library (N threads scheduled on 1 process) and
> a N:M model (N threads scheduled on M LWPs). However, modern FreeBSD
> versions only support a M:M threading model where each user thread is
> backed by a dedicated LWP. This thread target only supports this
> threading model. It also uses ptrace to query and alter LWP state
> directly rather than using libthread_db to simplify the implementation.
> FreeBSD recently gained support for reporting LWP events (birth and death
> of LWPs). GDB will use LWP events when present. For older systems it
> fetches the list of LWPs in the to_update_thread_list target op to update
> the list of threads on each stop.
> This target supports scheduler locking by using ptrace to suspend
> individual LWPs as necessary before resuming a process.
Code changes LGTM.