From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WatXLM2Ra2lAwwcAWB0awg (envelope-from ) for ; Sat, 17 Jan 2026 08:42:37 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=s4dk/kYf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B17771E0DD; Sat, 17 Jan 2026 08:42:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 1CF841E070 for ; Sat, 17 Jan 2026 08:42:37 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id AEDFB4BA23D6 for ; Sat, 17 Jan 2026 13:42:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEDFB4BA23D6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=s4dk/kYf Received: from sonic311-30.consmr.mail.ir2.yahoo.com (sonic311-30.consmr.mail.ir2.yahoo.com [77.238.176.162]) by sourceware.org (Postfix) with ESMTPS id 755884BA2E2F for ; Sat, 17 Jan 2026 13:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 755884BA2E2F Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=yahoo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yahoo.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 755884BA2E2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=77.238.176.162 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768657283; cv=none; b=q82sIzhBwQD5MngErRV7PGQRmdbvJ+aVnZi3kZzxqXnbdmztUrq9Rn1oS+JAH5Pi4Vfl9bxoYE4sr/3bGlTXisN2Lq1RuFovW3oncl9f8J392QfkVN+y37MTzpaKa0bYKKRv+0zd8gJz7YNOsRVtcSWmvBmYhYdpESIwLavTVOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768657283; c=relaxed/simple; bh=NXRQJva2w7gSXASIL6sCMRyvPTaqXMpOCea4PKkUuQI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VC0TIKakg+lSP4/3U1BqGpfnIs+ybDm+DQ7Rb11pxUDjTsK/xg9tv+O5bXXU9sayuciicSNo6uDSmBFyOrAs1NoK65phesLuy2gHNN6UFirD35Zhrw9iSMsZhJk+BZyp+9CxHhIhk7C+bcWlU0DOjJFQdhy0lpgFGaoeVFULpWA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 755884BA2E2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1768657282; bh=ETJk8NaXC+Lp5NWaHpY+HBYPSVZtsuNwzzBy/CddCG0=; h=From:To:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=s4dk/kYfJjeez6qtEaTFMJxJBr8iIigzRN7X//Pl+tyowyivS2W43QS013VSFhE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qWzaq8eaV0P3SFMMPdOX3OVn9cOvf49DI26iVZJz1BtdWOom3BRwAytXhJvvYbLCsGWIengu_ GJxSsjj4tW8eP3lgpyU8y7Xi193.xZNCoKyP1DnKLWQZCJnYN8UOI7PhdpJM70QQe2zqoG0pqHx. meoBydVbC8BD0SVzsnoCEzGP2lDzHFFgoKGKGojTy32IH2.1m2e25umBVLa.HdyXQUTsFILDrHkD EEjHB4ZGxKznvWe6lOl0O91EAbGUr09B0Vl3j358rUubfmXQj.6fUgjWw_Jr4ihtXpsNxaGVQM3O AiWVSAY7WTEPoWM7LsUA.8Un7qJxdnGegrRRaBUwlhIlhsZAo8ygiW8595yIL1oixfDuJnhQ.LpI 7Eeoq7SfYKxkseFEDbkJtZMH7qbEBXNRQV4hhvOLI6VWYLgyu2I95rBNRr3cMgQkyt7mzDPT8_vJ LvF.ZoyGWeKtp9UIHKgLbsG55jJnb6_INiJoU5SsKi1FodSuDc0xBxI0n.UfX8sDkWaih0yOjm30 LHEPjUsBxIgxQaFVMEMYG.PApka6J_HOc6PX0K.EfMcCC_cJelEUaRc2pa4cu_00BR2DjBsnJfcy tnmHrHLtHkmj6AoTO8G.GMZ1H8.mFO1BfrY3_flD3VoIgQQCJCqNFaHgAkkejQHehe4_NiNOV890 WLXoIjxuWO64iThBwxLwaCoeO9fS_xzDqQHUQpVcAAMXXGLW.zla0XgQqtkXKYqWrPE72jqjVqeT P7DzIORlAtbcl54bwq3YBiTlfkHufzyXGM7myOZBlt7SRtCiKPR9d2WZtMjzGuPuRiJVjbkDNxyb aEtVp8GDO8W35YbSjIq7lYz6dfB5iPtXg2cGxrxgKKrzYTZnjS4Tye0uKHi.VROo_WGWk9uNon9G DfhIkW1Y7UeC5OEEu_MIrycxFX8V0NQ-- X-Sonic-MF: X-Sonic-ID: 30982c1e-2a39-433e-a8c1-77d35184cb06 Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ir2.yahoo.com with HTTP; Sat, 17 Jan 2026 13:41:22 +0000 Received: by hermes--production-ir2-6fcf857f6f-fskn5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8b536636b504c3e6f51c508e4731c748; Sat, 17 Jan 2026 13:41:19 +0000 (UTC) From: Hannes Domani To: gdb-patches@sourceware.org Subject: [PATCH v2 04/11] Create x86-windows-nat.c Date: Sat, 17 Jan 2026 14:36:15 +0100 Message-ID: <20260117134052.2660009-4-ssbssa@yahoo.de> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260117134052.2660009-1-ssbssa@yahoo.de> References: <20260117134052.2660009-1-ssbssa@yahoo.de> 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 Also creates the x86_windows_per_inferior and x86_windows_nat_target derived classes in there which will then hold the arch-specific data and function overrides. --- Changes in v2: - kept windows_process variable in windows-nat.c and initialized it in INIT_GDB_FILE(x86_windows_nat) --- gdb/Makefile.in | 1 + gdb/configure.nat | 12 ++++++++---- gdb/windows-nat.c | 7 +------ gdb/x86-windows-nat.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 gdb/x86-windows-nat.c diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 161e8128e98..b564048f9fa 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1985,6 +1985,7 @@ ALLDEPFILES = \ x86-gnu-nat.c \ x86-nat.c \ x86-tdep.c \ + x86-windows-nat.c \ xstormy16-tdep.c \ xtensa-config.c \ xtensa-linux-nat.c \ diff --git a/gdb/configure.nat b/gdb/configure.nat index 1325d584bea..3ac0319328f 100644 --- a/gdb/configure.nat +++ b/gdb/configure.nat @@ -128,7 +128,8 @@ case ${gdb_host} in i386) # Native config information for GDB on i386 # systems running Cygwin. - NATDEPFILES="${NATDEPFILES} i386-windows-nat.o" + NATDEPFILES="${NATDEPFILES} i386-windows-nat.o \ + x86-windows-nat.o" ;; esac ;; @@ -137,7 +138,8 @@ case ${gdb_host} in i386) # Native config information for GDB on amd64 # systems running Cygwin. - NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o" + NATDEPFILES="${NATDEPFILES} i386-windows-nat.o \ + amd64-windows-nat.o x86-windows-nat.o" ;; esac ;; @@ -361,14 +363,16 @@ case ${gdb_host} in mingw) case ${gdb_host_cpu} in i386) - NATDEPFILES="${NATDEPFILES} i386-windows-nat.o" + NATDEPFILES="${NATDEPFILES} i386-windows-nat.o \ + x86-windows-nat.o" ;; esac ;; mingw64) case ${gdb_host_cpu} in i386) - NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o" + NATDEPFILES="${NATDEPFILES} i386-windows-nat.o \ + amd64-windows-nat.o x86-windows-nat.o" ;; esac ;; diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 7fdd6cf81b5..68eebe1eaf9 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -73,8 +73,7 @@ using namespace windows_nat; /* The current process. */ -static windows_per_inferior x86_windows_process; -windows_per_inferior *windows_process = &x86_windows_process; +windows_per_inferior *windows_process; #undef STARTUPINFO @@ -2868,10 +2867,6 @@ INIT_GDB_FILE (windows_nat) calling x86_set_debug_register_length function in processor windows specific native file. */ - /* The target is not a global specifically to avoid a C++ "static - initializer fiasco" situation. */ - add_inf_child_target (new x86_nat_target); - #ifdef __CYGWIN__ cygwin_internal (CW_SET_DOS_FILE_WARNING, 0); #endif diff --git a/gdb/x86-windows-nat.c b/gdb/x86-windows-nat.c new file mode 100644 index 00000000000..d1f78a01255 --- /dev/null +++ b/gdb/x86-windows-nat.c @@ -0,0 +1,42 @@ +/* Native-dependent code for Windows x86 (i386 and x86-64). + + Copyright (C) 2025-2026 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "windows-nat.h" + +#include "x86-nat.h" + +struct x86_windows_per_inferior : public windows_per_inferior +{ +}; + +struct x86_windows_nat_target final : public x86_nat_target +{ +}; + +/* The current process. */ +static x86_windows_per_inferior x86_windows_process; + +INIT_GDB_FILE (x86_windows_nat) +{ + /* The target is not a global specifically to avoid a C++ "static + initializer fiasco" situation. */ + add_inf_child_target (new x86_windows_nat_target); + + windows_process = &x86_windows_process; +} -- 2.52.0