From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EZ8DEVXX62kyVDkAWB0awg (envelope-from ) for ; Fri, 24 Apr 2026 16:49:25 -0400 Received: by simark.ca (Postfix, from userid 112) id 40B261E0BA; Fri, 24 Apr 2026 16:49:25 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED 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 C31F31E093 for ; Fri, 24 Apr 2026 16:49:24 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 6D6EA4BB5918 for ; Fri, 24 Apr 2026 20:49:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D6EA4BB5918 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by sourceware.org (Postfix) with ESMTPS id 125F04BB8F50 for ; Fri, 24 Apr 2026 20:46:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 125F04BB8F50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 125F04BB8F50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777063594; cv=none; b=OZ+jJ3kPmz0R/esXk4UThbIWf49dDXfVPAcf9BfBqMNlW08NAXP+vL0ak1LwYgXhJ+UbFJpnO4SjiY4mhLU2xweaNRdSsEp9kxRhHU++5FZNFKXIqBFGuFn+4OnR4aXBR0u4Dh3wTRpwy5C4d2a18y6DA4Qc38vGrV+XTx9mCf0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777063594; c=relaxed/simple; bh=HIqfKGduOOOqp9Szyo4fXoWB5LRnwoyr1nCH02r5SLk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=LC8uYSf5x2gudSJRVwA+AAT/+mOiAhUnl3HNPObyqqpYUFAC0SwI067GQh8MZ1qYygwLDmYnwjhQM6nx0vKfB4a0ApTeQ0pf42S2Z/husYnnGqKDT1WNHtL/9j2mnJdSIFq/uI+kWGovgqSv7i6mer2MTz3lD/d+M3CsGi12f5k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125F04BB8F50 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4891d7164ddso38718635e9.3 for ; Fri, 24 Apr 2026 13:46:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777063592; x=1777668392; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Guxdx3FuPxVVACMSpsYX1Xe+2dsqzng9nNIWWJBnlSE=; b=eXJxhfKUg1n0e5VNFztXw0yjqV/AEG/dR2fabzZDphZaUh14p6/WreCvQ7WF0S5oyv uxzDVtry2sca/ovDXkHXANJc36PHWV20/HNWk5DUiehyk5JZaiiN6pwahCTWSm6VRLf1 NVdRHB1lS08+0XTWwSoSuV/VmCg4f4Xxn29FQwZTUviriazQ45WuvgjFaIejCKIBudVC I6+q4QbxrsyBFR6tWKKAiyIguZ5uNoqWmMluhczeuDZXw8SDVtZeMWy9bU89OjelEONq papmX8P4TANvJEkpm6CD+eBiLcGtBhG1pXk0IQYM0+22dIKGA9PH6YWQU0yEJDOi5FPG QPgg== X-Gm-Message-State: AOJu0Yxh92oqq5Ku0yuMmy5FaQ/xQvM2IPbcdwBK5srUAjGi5RLSabZi fmDanmJZPIQ1yb2lpxrqIONUwcYgpMmE7nRrbceb4RF77WtyPW0Z3i395z8wk2vh X-Gm-Gg: AeBDievhgNVeLX0xzuxSpHeTGcosPQfDIi7cvP+yp2oO9jrkyZ9c1WTeG4Q2LqCvTlR OflDuyWpVFWMP4cZMOrbbMWN6QWGi7yj0FygK3rBvJrstTe6cwQ9Bj+NYbBF2K/dOf8Qk1zlyNV bbRSTI5p9rMjzUYuEdrjG5oxvqQknZMdGid2Ef9mdb739g2fpg+NlrtNj2LnCFXvIvb0NB1vWzA 72tJn6LlBK6CPEVGfecQLykaPl255YcVClLw7lSH4wyoZ1ahrGd4XDXNzEtNZ19/GpDzZNCyXqC yL2Bsxc8JitqMuKQ8jQjl2B5IsWb5p48+CuLrGDZ4B0RXYXp6XnGCkkE6teyiKgZ3sGvCP6jp1u EtjKRjfPiWYM6+ivqP3VCn95ic+pFN4Ldq3j6IuaNIbmIM9daaZIxJ8IBvFi8WNStVTA1ip2axj UgrmriAajal/qSitWEamfkjavpbbCyd6Z7ay5vxoSPmWA= X-Received: by 2002:a05:600c:8a08:b0:488:a82f:bb9b with SMTP id 5b1f17b1804b1-488ff369a1cmr368742975e9.30.1777063592259; Fri, 24 Apr 2026 13:46:32 -0700 (PDT) Received: from localhost ([2001:8a0:facb:a800:7315:8865:c664:fc06]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-488fb7bf7besm219428245e9.34.2026.04.24.13.46.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2026 13:46:31 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed 27/28] Windows gdb: Move debug macros to windows-nat.h Date: Fri, 24 Apr 2026 21:45:07 +0100 Message-ID: <20260424204508.1343973-28-pedro@palves.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424204508.1343973-1-pedro@palves.net> References: <20260424204508.1343973-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Move the Windows native debug macros to gdb/windows-nat.h, so that they can by used in x86-windows-nat.c. Change-Id: I002b3e3e319bcb005b2c6424affd750a0fcd1a83 commit-id:5ec9181a --- gdb/windows-nat.c | 20 +++++--------------- gdb/windows-nat.h | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index b2142469474..fba1ae6c40b 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -87,17 +87,11 @@ windows_per_inferior *windows_process; #define _CYGWIN_SIGNAL_STRING "cYgSiGw00f" #endif -#define DEBUG_EXEC(fmt, ...) \ - debug_prefixed_printf_cond (debug_exec, "windows exec", fmt, ## __VA_ARGS__) -#define DEBUG_EVENTS(fmt, ...) \ - debug_prefixed_printf_cond (debug_events, "windows events", fmt, \ - ## __VA_ARGS__) -#define DEBUG_MEM(fmt, ...) \ - debug_prefixed_printf_cond (debug_memory, "windows mem", fmt, \ - ## __VA_ARGS__) -#define DEBUG_EXCEPT(fmt, ...) \ - debug_prefixed_printf_cond (debug_exceptions, "windows except", fmt, \ - ## __VA_ARGS__) +/* Debug options. */ +bool debug_exec = false; /* show execution */ +bool debug_events = false; /* show events from kernel */ +bool debug_memory = false; /* show target memory accesses */ +bool debug_exceptions = false; /* show target exceptions */ /* User options. */ static bool new_console = false; @@ -105,10 +99,6 @@ static bool new_console = false; static bool cygwin_exceptions = false; #endif static bool new_group = true; -static bool debug_exec = false; /* show execution */ -static bool debug_events = false; /* show events from kernel */ -static bool debug_memory = false; /* show target memory accesses */ -static bool debug_exceptions = false; /* show target exceptions */ static bool useshell = false; /* use shell for subprocesses */ /* See windows_nat_target::resume to understand why this is commented diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h index 15a177214f2..e5084631e5d 100644 --- a/gdb/windows-nat.h +++ b/gdb/windows-nat.h @@ -26,6 +26,23 @@ #include "nat/windows-nat.h" #include "ser-event.h" +extern bool debug_exec; /* show execution */ +extern bool debug_events; /* show events from kernel */ +extern bool debug_memory; /* show target memory accesses */ +extern bool debug_exceptions; /* show target exceptions */ + +#define DEBUG_EXEC(fmt, ...) \ + debug_prefixed_printf_cond (debug_exec, "windows exec", fmt, ## __VA_ARGS__) +#define DEBUG_EVENTS(fmt, ...) \ + debug_prefixed_printf_cond (debug_events, "windows events", fmt, \ + ## __VA_ARGS__) +#define DEBUG_MEM(fmt, ...) \ + debug_prefixed_printf_cond (debug_memory, "windows mem", fmt, \ + ## __VA_ARGS__) +#define DEBUG_EXCEPT(fmt, ...) \ + debug_prefixed_printf_cond (debug_exceptions, "windows except", fmt, \ + ## __VA_ARGS__) + using windows_nat::windows_thread_info; /* A pointer to a function that should return non-zero iff REGNUM -- 2.53.0