Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/2] remote.c: Use the ptid.lwp field to store remote thread ids rather than ptid.tid.
Date: Wed, 12 Feb 2014 18:09:00 -0000	[thread overview]
Message-ID: <CADPb22S4rpZmP1+tzgfRjhN1eBGana55mDUhNRVaQ3X+k_badw@mail.gmail.com> (raw)
In-Reply-To: <1392214020-21478-2-git-send-email-palves@redhat.com>

On Wed, Feb 12, 2014 at 6:06 AM, Pedro Alves <palves@redhat.com> wrote:
> From GDB's perspective, independently of how the target really
> implements threads, gdb/remote sees all threads as if kernel/system
> threads.  A rationale along theses lines led to gdbserver storing
> thread ids in ptid.lwp in all ports.
>
> I believe that on the GDB side too, it's best that we standardize on
> process_stratum targets using the ptid.lwp field to store thread ids.
> The idea being leave the ptid.tid field free for any thread_stratum
> target that might want to sit on top.
>
> Because remote.c is currently using ptid.tid, we can't make gdbserver
> and gdb share bits of remote-specific code that manipulates ptids.
>
> This patch thus makes remote.c use ptid.lwp instead of ptid.tid.
>
> Tested on x86_64 Fedora 17, w/ local gdbserver.
>
> gdb/
> 2014-02-12  Pedro Alves  <palves@redhat.com>
>
>         * remote.c (remote_thread_alive, write_ptid, read_ptid)
>         (read_ptid, remote_newthread_step, remote_threads_extra_info)
>         (remote_get_ada_task_ptid, append_resumption, remote_stop_ns)
>         (threadalive_test, remote_pid_to_str, _initialize_remote): Use the
>         ptid.lwp field to store remote thread ids rather than ptid.tid.

Awesome.  Thanks.


  parent reply	other threads:[~2014-02-12 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 14:07 [PATCH 0/2] remote.c: ptid.tid -> ptid.lwp Pedro Alves
2014-02-12 14:07 ` [PATCH 2/2] common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp Pedro Alves
2014-02-12 14:07 ` [PATCH 1/2] remote.c: Use the ptid.lwp field to store remote thread ids rather than ptid.tid Pedro Alves
2014-02-12 16:56   ` Tom Tromey
2014-02-12 16:58     ` Pedro Alves
2014-02-12 18:09   ` Doug Evans [this message]
2014-02-19 19:09 ` [PATCH 0/2] remote.c: ptid.tid -> ptid.lwp Pedro Alves

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=CADPb22S4rpZmP1+tzgfRjhN1eBGana55mDUhNRVaQ3X+k_badw@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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