From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HHYwJgUpl2pWsxsAWB0awg (envelope-from ) for ; Tue, 01 Sep 2026 15:35:33 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WF7kx02c; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 889CA1E166; Tue, 01 Sep 2026 15:35:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 969B41E033 for ; Tue, 01 Sep 2026 15:35:32 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0FE434BA799E for ; Tue, 1 Sep 2026 19:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FE434BA799E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WF7kx02c Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id C49254BA2E3F for ; Tue, 1 Sep 2026 19:35:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C49254BA2E3F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C49254BA2E3F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788291301; cv=none; b=pK07ZzfHOXpTWMRIw7Lr4ER8PL6pTLlHjMGD2m1Yhg/ymQylHikpSiXytW/yqBfhj15yvOvEk5MMhuy6BuSRLTzw7whnM5/tlRbnOlWzB6CzmDRSVw0tVxqDMXqpDxT0m8LhHqA0czcc9uOWHP/wsNQDZhXsatK3OyDJepLfCoU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788291301; c=relaxed/simple; bh=MBNPc52JsbtYO2Byiq7Y9KbtHvuLBYwX1Z1MALFTC1c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kofFF9q/AF/RbSYvWnR6zA2JbXhH5CS28uwboEz+S6WilM9ilc4H5p8q8umCyyYDi6pxUDO9z2qNB1es5IrhX1a2Yl789I4njxu14J75maj2Me7Ubu1qEzjvbi146EynXgHTG+Lw2Cof3pfteM9LD/+SxrrakfU6a1kXLcePT3M= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WF7kx02c DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C49254BA2E3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788291301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e317MBaHJ+3zAyeCtQ9wxGuB06BffiI7banXhwwkvCo=; b=WF7kx02cFQ45vZ/haRItIvSZql+MYClafhT+nXvUb+/4rLQYaMJ/bNohQ26jcUkAjU58sC 3oPPEWB4ffNUe7MZpuo/ywy7Slhm0wWG2Mk8aNWd0mKfhJcsJribt0Wo9nNtvzxycSa1Qr j9ioUKhQIts493giELMMvzb90qYae8g= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-pjkjxivyMICb518FWlXOtA-1; Tue, 01 Sept 2026 15:34:59 -0400 X-MC-Unique: pjkjxivyMICb518FWlXOtA-1 X-Mimecast-MFC-AGG-ID: pjkjxivyMICb518FWlXOtA_1788291298 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49b0d7a07acso1401225e9.3 for ; Tue, 01 Sep 2026 12:34:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788291298; x=1788896098; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=e317MBaHJ+3zAyeCtQ9wxGuB06BffiI7banXhwwkvCo=; b=Bt9BkpWIjlTjZjzXP9CBCpbkeDKbSuJzOBvc9gTNfeO2LYGeiIofW3GskD1CySGOSx mg4EGTNSlPKC8fu+gmD4vpvGoPxwPtVDDRpCs2rLXFo8bn0pO0ahzis9j+uTVmyLuqzV 5joPL4J6RIjX5MXWhZxsCfZU7RHNDpCAK2Ax5uisg/XRMX9tD07QdMsVpoELUYA6V8WZ nAFrr09dqtNj+SXT2N2Ld3EyPFq05VJj1k0kA821zWTlB7or4zQA50W4H+sNaPRnMlJd ZOkcxppxFJZO/h8RvRGPwaOW2ybFMVqSVKhdCBMRcBBfL/NDLozHTR2YRM+CrnO2cR1H nPow== X-Forwarded-Encrypted: i=1; AHgh+RrTf85tm+Z1Dqdyb9kystDYuR/bVlwFuVqMizDnFfiZGKut2Jtf6onh9ZsDSGTuYKOwT8uon8QaHZIyfg==@sourceware.org X-Gm-Message-State: AFuF++lhA9BzMPjPzV4No3U1txnlLnP0S2DkzEoIaQ1U0oESYy6NPQPX /gy3Yz0O0oO+mRt9dYgpNMGXgOj8CVHqG5Is0j61+BRVnya4l3h6OjkQP063GdQ3BTs6y+sgry2 crRNFzJNvzTiV2imbGfPtZhvhbyT5Gb4E9LQirTjG3VZBGWLr2mE1v94CID4vAMo= X-Gm-Gg: AR+sD12mpFDExQccRaIuQbkgXWISYoxzy3/dtIL8fPb6ttnvRkh5KVdUUKYIDTZpeXQ 9/xHD56/mSAo6WrVJtb4XC2i7bIJq4XLA+8CL/FSmRth1NaulI5BU7bODR15wtpMWujb2EcoXyf jdIRZqsw8EtBMc/KAEaij5qzMPQ9ig5NlJ+N8E9oJF2zLYXejA3Mm6C+FuaQJHn613achQBzNgj pFm/o7/1wwh1hUvWNh9eWQERIhVCvqB3SPo0GP6oUaPGbBFhAE/i25H0E/Kl9B0cgacwE/NMrgO zyM4zgB1/iL0cGKa3KcS614LbSDJJUx41h8veg28YzdqpEAUGmTlm8L6VjPWZ3Pdji1NmQXFdC5 oOgafwLow2bmyjhW9BDF1tAl4 X-Received: by 2002:a05:600c:1d1d:b0:49b:d45:703e with SMTP id 5b1f17b1804b1-49b91c2dfecmr557218605e9.8.1788291298364; Tue, 01 Sep 2026 12:34:58 -0700 (PDT) X-Received: by 2002:a05:600c:1d1d:b0:49b:d45:703e with SMTP id 5b1f17b1804b1-49b91c2dfecmr557218145e9.8.1788291297958; Tue, 01 Sep 2026 12:34:57 -0700 (PDT) Received: from localhost (92.40.184.162.threembb.co.uk. [92.40.184.162]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce47885b1sm8137015e9.14.2026.09.01.12.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2026 12:34:57 -0700 (PDT) From: Andrew Burgess To: Tom Tromey , gdb-patches@sourceware.org Cc: Tom Tromey Subject: Re: [PATCH] Two logging fixes to win32-low.cc In-Reply-To: <20260901192455.3344494-1-tromey@adacore.com> References: <20260901192455.3344494-1-tromey@adacore.com> Date: Tue, 01 Sep 2026 20:34:56 +0100 Message-ID: <87y0dksr33.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _BJuMBKlEoVaX660IjuBAxfqL8IXXtlvolixTUfZdjY_1788291298 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 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 Tom Tromey writes: > While debugging the Windows gdbserver, I found a couple of minor > problems in some logging statements in win32-low.cc. > > First, one spot could call target_waitstatus::sig for the wrong kind > of object, resulting in an assertion failure. > > Second, the "unknown" logging case can be made a bit nicer by printing > a string rather than an integer. LGTM. Approved-By: Andrew Burgess Thanks, Andrew > --- > gdbserver/win32-low.cc | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc > index 7629beca213..13c14a7c69f 100644 > --- a/gdbserver/win32-low.cc > +++ b/gdbserver/win32-low.cc > @@ -1168,8 +1168,11 @@ win32_process_target::wait (ptid_t ptid, target_waitstatus *ourstatus, > case TARGET_WAITKIND_SIGNALLED: > case TARGET_WAITKIND_LOADED: > { > - OUTMSG2 (("Child Stopped with signal = %d \n", > - ourstatus->sig ())); > + if (ourstatus->kind () == TARGET_WAITKIND_LOADED) > + OUTMSG2 (("Child stopped due to library load\n")); > + else > + OUTMSG2 (("Child stopped with signal = %d \n", > + ourstatus->sig ())); > maybe_adjust_pc (current_event); > > /* All-stop, suspend all threads until they are explicitly > @@ -1179,8 +1182,8 @@ win32_process_target::wait (ptid_t ptid, target_waitstatus *ourstatus, > return debug_event_ptid (¤t_event); > } > default: > - OUTMSG (("Ignoring unknown internal event, %d\n", > - ourstatus->kind ())); > + OUTMSG (("Ignoring unknown internal event, %s\n", > + ourstatus->to_string ().c_str ())); > [[fallthrough]]; > case TARGET_WAITKIND_SPURIOUS: > /* do nothing, just continue */ > > base-commit: 6f24afa4391bd33f1263378280b99385d2c13055 > -- > 2.55.0