This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 01/13 v2] Introduce current_lwp_ptid
- From: Doug Evans <xdje42 at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Gary Benson <gbenson at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 28 Oct 2014 12:43:11 -0700
- Subject: Re: [PATCH 01/13 v2] Introduce current_lwp_ptid
- Authentication-results: sourceware.org; auth=none
- References: <1412848358-9958-1-git-send-email-gbenson at redhat dot com> <1412848358-9958-2-git-send-email-gbenson at redhat dot com> <544F925C dot 20408 at redhat dot com> <CAP9bCMTzML+6ZNjEewyBy4eYsU3OGi0OYjDsP17bRyPqVVJL9A at mail dot gmail dot com> <544FCC92 dot 80309 at redhat dot com>
On Tue, Oct 28, 2014 at 10:04 AM, Pedro Alves <palves@redhat.com> wrote:
> On 10/28/2014 04:44 PM, Doug Evans wrote:
>
>> Is there a particular reason current_lwp_ptid is chosen over
>> current_thread_ptid?
>
> For-specific Linux native code, it doesn't really matter that much
> to call something "thread" or "lwp" nowadays, given with NPTL, we
> assume a 1:1 model. But this is native Linux code working at the
> lwp level. The code around this will end up calling iterate_over_lwps.
> And then x86_linux_dr_get thinks in terms of lwps too. Likewise a
> all the x86 Linux debug regs related code touched or added by the
> rest of the series. Using "lwp" here is more consistent.
Ergo my followup request:
Can a comment please be added to the declaration of current_lwp_ptid
explaining this?
[I don't have a strong preference for documenting this naming choice
with this particular function, but it's as good a place as any for
me.]