From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oYO1KwmVa2kYxwcAWB0awg (envelope-from ) for ; Sat, 17 Jan 2026 08:56:25 -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=JNaQRYGB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B089A1E0DD; Sat, 17 Jan 2026 08:56:25 -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 03F1C1E070 for ; Sat, 17 Jan 2026 08:56:25 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 8E06C4BA23DC for ; Sat, 17 Jan 2026 13:56:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E06C4BA23DC 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=JNaQRYGB Received: from sonic306-20.consmr.mail.ir2.yahoo.com (sonic306-20.consmr.mail.ir2.yahoo.com [77.238.176.206]) by sourceware.org (Postfix) with ESMTPS id 336294BA2E34 for ; Sat, 17 Jan 2026 13:55:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 336294BA2E34 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 336294BA2E34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=77.238.176.206 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768658120; cv=none; b=a5EXQA7J9ZepyFvISMUo0RcPOXuO3KivkcEA/gp6kwim1p3zkzRDexayDSEn3CLvuHkWUWGQ5gghf4v2ntImja51IBRE1iail1SFSA4PpFXT+RoI8w2qLgkgYAJ5HQNF2HvvGFtas3RwR49OKINpbDECOWWshHZw1jPdDu4B+Tw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768658120; c=relaxed/simple; bh=oz8YYxjsuNcmZQiMJWNH9pFvOHZUaL+MaGDt5RRO+vg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZHIObNDgK4ucpJ8TH5EBqjoe9CUnxQqoeA5CgKBh0wYYNMelIMpqGMiOsKquWtOUKPbY3ZUq6SDg63joyYSDBAIlZdMmUlb91jFr3LsYTJR73Wny3Qel89RNnqR+sqH1p3egLaXQfSG5XCyXXwAU3M/aHzmZeawgB5WfqPbvedc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 336294BA2E34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1768658119; bh=m8R0i5MlyHUY+NzsXamPbZNkz2bobYJsvj19bZMYn2c=; h=From:To:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=JNaQRYGBqIqPVGRxC/7UwK5fXQxP7ves/y6fIA4dqmkKxC0H6kwRe++K1KQFFScdt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RX3wHaymEphg__ oLJlcFcgQW2paYuhya5cotsQx0OIYUZV0ycgq0tUeAGhD49vMwvsobt2tnh4jQM2PK465BrI2Wk2 jTx7vJAEBKt_fDJjQmZkA5iKrgGhBC00r3uxErL3w7h9c47Bs0l.LUZ2zo12xA0_kgPDQCz352iX bFkHPxkTcRifVa.ta2mEmmdDA4mkFuEKMFHGg4b13nRVnhYKUORJwFtDkHhjZUyZKEOgt5wjQmht cdVmm.5wcypPA9unn92.bi_BOC5peyAo_I5V7CTPllMYf02tAtKUzQTTRFvfKdlxFhX4G8v68m7c NcUOzNyRMTHZf4mgleiBxsSmWbAGABD3JrtS80gFnNHYFKXe2qT1rQz6h82CPSXZTAZ2l_fryfJ. KiXJy1t7FfoRlqBr5pMgEVsQiNmjqEKEIYB6CYnV_CEGHtGCxg5wxlEGEk9AUGKLt0xVhKs9w5q2 fgZhc6ct91Y7rdHQ7F1Fa3OqFinreBRmFBpEOc9N9XSfcSnHV3E_zu4Karpp2ebGfgyuuZCWR_2f GBPyekdnbopF2hX_YxcOOQYwfDqN3pl2QfWYWdg4Rev8m76sh0qUmUkvXt17SrMHtXCOjZkaohDk wd8xyF_9SNjyrGN8vqcB6bCXJKMzVosxM.3hAVLVMHOSEL55K65hEtA_lBtAOvhLj_nBFtYpRciv U5aGPGTzTM6e3x5ZJa2oVCc.UO41USKwdgyqtC.PysRAjaEd54iJBYLRkRX7e9tmmiGRejfWrIvr tJq2WKWLaX.OXuksWZpJ0M8uTrFbQ.j4lzepO5k4snYnLsngCmjxKRY2bJc.mEsbbuP_9ox5BbDq 77cco5gyc9uHJo4Tvnv9juAgwSxAYsVTkH.l8jaFU25rEzOUqvcQrcwzEwqWgaOZT1__Dj8PmN_3 OkEEKXK54EAx08PqvuebPIT517JNFX3k4kpvVIOu0 X-Sonic-MF: X-Sonic-ID: b3c23464-3ce1-4221-953f-4834addbbc3f Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sat, 17 Jan 2026 13:55:19 +0000 Received: by hermes--production-ir2-6fcf857f6f-68cr8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1ab9324439058ba9e338fb11da35c341; Sat, 17 Jan 2026 13:55:14 +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:54:27 +0100 Message-ID: <20260117135448.2666604-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. --- 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