From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by sourceware.org (Postfix) with ESMTPS id DDEDB3858D38 for ; Tue, 22 Aug 2023 13:07:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DDEDB3858D38 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-wr1-f49.google.com with SMTP id ffacd0b85a97d-317f1c480eeso4030212f8f.2 for ; Tue, 22 Aug 2023 06:07:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692709629; x=1693314429; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lE1HGT6eDTybOsfM4p1JTRd3foEM6+RDdjfmfCt7xpo=; b=kip/zcDrtbGS97K/rrsug/d9jUGMc/JHvBH8gbSRsyzzzVLLFRDhQia9R8drSto9/C UndTAMYt3jIjlQP0oNxj3NdVGy4dJvL3QEO84v+cyVEVXE9Owf2/DBukUkcI8w4HQ5l7 W9QfvgR8rHOezCvBRS6rAqD4Z7gdvrQ/UsGJpPxn9AUAEcsW1tuE20da6qAoyGfiOmwv XR9GkMv9w4OznMGkbeUucaFXh+wd0TC7QMtgb5dK8TKWuzPWEYw/uUiqirp6tZC2YS6A nTdw5m97L1yyZOsVxO8GWz/HLB/6hZ1fjNmpIzjEQfCIoAbuAV8TmWRK9rt2fiNa0w6T Z38A== X-Gm-Message-State: AOJu0YwrQhFqDh1khJWgUz3GL4QzGIxPXWIyh4bmgUMukPEzN1C5HG6R S2fE0VstXtOhylU+PTxUW83sRAYLmKqApP9Y X-Google-Smtp-Source: AGHT+IEkINMWXSIosIVEKzbtabPGSRDvWxBQucS0tAXRmMik/yQqT468DUHUil/wbDijryR8GqjJPA== X-Received: by 2002:a5d:630d:0:b0:31a:c6b2:8c63 with SMTP id i13-20020a5d630d000000b0031ac6b28c63mr6633753wru.21.1692709629265; Tue, 22 Aug 2023 06:07:09 -0700 (PDT) Received: from ?IPV6:2001:8a0:f90f:8600:1210:1829:770d:f735? ([2001:8a0:f90f:8600:1210:1829:770d:f735]) by smtp.gmail.com with ESMTPSA id a22-20020a05600c225600b003fed8e12d62sm13666825wmm.27.2023.08.22.06.07.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Aug 2023 06:07:08 -0700 (PDT) Message-ID: Date: Tue, 22 Aug 2023 14:07:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 0/3] Fix thread exited messages for remote targets Content-Language: en-US To: John Baldwin , Andrew Burgess , gdb-patches@sourceware.org References: <327aa847-c856-5644-af0e-640151694fb1@FreeBSD.org> From: Pedro Alves In-Reply-To: <327aa847-c856-5644-af0e-640151694fb1@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-08-21 17:10, John Baldwin wrote: > One question I have is why is the optional metadata specifically a > ULONGEST exit code rather than just a std::string suffix?  If it were > a string then windows-nat.c could use something like: > >    std::string info = string_printf ("with code %u", (unsigned) exit_code). >    delete_thread_with_info (to_del, info, silent); > The idea was that if other targets want to print something, it'll probably be the thread exit code as well, so keeping the text formatting centralized ensures any such target prints it in the same way. For example, the remote target's "thread exit" stop reply is "wNN", but we're not printing that thread exit code today. Remote debugging with Windows gdbserver ideally would want to print it, I think. On Linux, we also have access to the lwp's exit code, though I think that in practice it's always 0.