From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24266 invoked by alias); 12 Feb 2014 18:09:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24225 invoked by uid 89); 12 Feb 2014 18:09:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vb0-f54.google.com Received: from mail-vb0-f54.google.com (HELO mail-vb0-f54.google.com) (209.85.212.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 12 Feb 2014 18:09:22 +0000 Received: by mail-vb0-f54.google.com with SMTP id w20so7370077vbb.13 for ; Wed, 12 Feb 2014 10:09:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=v6Hj9jjzI/h/Oc9oSy4j/WMo4XI9fdX58aPoBQtQMD0=; b=AZ+NtP+r/ZHpgNfn3iXwigbnLYAPdG0RKUv7uJRM1ctIpboH5lmdSS7kx6TylXvTtK vyRs9U30dDI5IX9BmakIeNZnZz7WR6Wa/OQ7mr4lMIPU70CsZmnWaLxcKjCaOnvUGNB3 7fjxpGFS050/RQxAirAufJu1ufig4kKD4Xfwa2bSZaqRxyMNjifQ/GYjPqFlQU0uIU41 6RLqPeFMNxtYck5Wa8QZLUt+ogway0e9FXNh9NPjA7QpiRPZJB07WcDe7a3NIFQcheJp g7FHp7Sb/aspnuaxYZ1xWNXEGEgjNJal3+NBGtbHvlZT8ADU1RXzqR5FTAFEQLOmyNT+ A2Zw== X-Gm-Message-State: ALoCoQmMYNiLF7powCaeGD5TFY/Y5RlPm7+/Dr+MxOeqPPFFLGeeD4dJF9y4PNomBaJWhbN06WXFsE9PelLrjGCu/eL8nDDhzBVI2nea06v1DV8xlygJmddCy8l5d+W9SHHERab2vLW37T706n3tZKPmqe0j3L2JCqUwPJ9i5nHp0zSk3MIBMlNpjXOx1vw3mooAOe64CVq4xx4xaVkbaq7Jejq89hF1xQ== MIME-Version: 1.0 X-Received: by 10.58.229.4 with SMTP id sm4mr18918260vec.10.1392228560734; Wed, 12 Feb 2014 10:09:20 -0800 (PST) Received: by 10.52.51.234 with HTTP; Wed, 12 Feb 2014 10:09:20 -0800 (PST) In-Reply-To: <1392214020-21478-2-git-send-email-palves@redhat.com> References: <1392214020-21478-1-git-send-email-palves@redhat.com> <1392214020-21478-2-git-send-email-palves@redhat.com> Date: Wed, 12 Feb 2014 18:09:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] remote.c: Use the ptid.lwp field to store remote thread ids rather than ptid.tid. From: Doug Evans To: Pedro Alves Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00428.txt.bz2 On Wed, Feb 12, 2014 at 6:06 AM, Pedro Alves 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 > > * 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.