From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2pQiAk2F7WD7CwAAWB0awg (envelope-from ) for ; Tue, 13 Jul 2021 08:21:33 -0400 Received: by simark.ca (Postfix, from userid 112) id F34AB1EDEE; Tue, 13 Jul 2021 08:21:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0D0E51E54D for ; Tue, 13 Jul 2021 08:21:31 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87F5C3954404 for ; Tue, 13 Jul 2021 12:21:30 +0000 (GMT) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 66CB6388983C for ; Tue, 13 Jul 2021 12:21:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 66CB6388983C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f43.google.com with SMTP id w13so13500578wmc.3 for ; Tue, 13 Jul 2021 05:21:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TBqPV7wJhkRl7eMRuhw7ViIi4j9oepdx5YxIGA6I8PQ=; b=Xrzh4W4ZYhT39WgdfguGeqPeq8HQwiyLpS8JTQAKcqhpHoU95kgCBD2iJp2i61v63x xP5lCneOlUzUqUMIWUKzTYaJz9W8RQlnxqDjByiaHs4LebMYu2AHTMtyGhREtqS1S/hm iRmVZ/EoBzLg6gaMnEi3GSz2E5ib0iuBVMvReBOJ/qiFApkea+c/yNIiz/Gf4HY7ChDZ f6VYGwGtuVCXur1cSKZ+N/y0aV7joNgmdyTy+5I5AUULjIlCkuXoqQc06CoFIPlI6jb/ +bVa+AQ6RReMkc2ptyitTscpfVP+H4kpHzuajP6OfncEi3N9d87z9BRoEccm0SmrJGiN 0QPw== X-Gm-Message-State: AOAM531+AsTE7rpQLT10Ygq5RKxd9NQNWYOLhyVfXc0MClmo2+Y26KRA JNF0SARqpvXjCtTPnmLYk4Lq4KHLFbsm1g== X-Google-Smtp-Source: ABdhPJwjwh3GHqogjakIG1jWjBB3mybk3e4bT+NgOYJbwbbSj6xvTlWc68U6/je9pJrxx7iz5gOYnA== X-Received: by 2002:a1c:ed10:: with SMTP id l16mr19991247wmh.8.1626178876742; Tue, 13 Jul 2021 05:21:16 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id a207sm2613131wme.27.2021.07.13.05.21.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 05:21:15 -0700 (PDT) Subject: Re: [PATCH 07/11] gdb: maintain per-process-target list of resumed threads with pending wait status From: Pedro Alves To: Simon Marchi , gdb-patches@sourceware.org References: <20210622165704.2404007-1-simon.marchi@polymtl.ca> <20210622165704.2404007-8-simon.marchi@polymtl.ca> <52c8488e-fef2-a1fe-d150-50d510bedbe1@palves.net> <252f2a84-c7b4-d07a-fecc-c57685a89ee1@polymtl.ca> <25ce9332-1145-6cfa-1520-540fe17debd6@palves.net> Message-ID: <226f0890-3281-cd9f-160b-11df704752df@palves.net> Date: Tue, 13 Jul 2021 13:21:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-07-12 11:28 p.m., Simon Marchi wrote: >>> Arggg, we don't want that. Since that is in a process_stratum_target >>> method, I'll change the message to call the pid_to_str method of the >>> current object instead: >>> >>> infrun_debug_printf ("removing from resumed threads with event list: %s", >>> this->pid_to_str (thread->ptid).c_str ()); >>> >>> Does that sound good? >> >> It does not. That would mean a target higher on the stack wouldn't have a chance >> at printing the thread. > > Since this is only for debug message purposes, and I find it clearer to > see the spelled-out ptid anyway (the pid, lwp and tid values), I added a > to_string method to ptid_t and used that here: > > std::string > ptid_t::to_string () const > { > return string_printf ("%d.%d.%d", m_pid, m_lwp, m_tid); > } +1.