From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EIC2NpAzK2g2NyoAWB0awg (envelope-from ) for ; Mon, 19 May 2025 09:35:12 -0400 Received: by simark.ca (Postfix, from userid 112) id DCDBC1E11C; Mon, 19 May 2025 09:35:12 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 62DC71E102 for ; Mon, 19 May 2025 09:35:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 029123858D26 for ; Mon, 19 May 2025 13:35:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 029123858D26 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id 7E957385841E for ; Mon, 19 May 2025 13:24:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E957385841E 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 7E957385841E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661094; cv=none; b=tZtN/nYNplm0fTeJLs/IOi2v+5PT5NBaSx4EOz2n3jMjavPHGh6qtenfCQ3e5h+AoUtxJiR6X3gfgAw6wrRs/6/TasyCdX0pqoJWyZwVImpr/yuf2G4AMyKKvLups3xvk9AHexmxniayxQy0VYMqbdSZQ9CFU1it9CalJjXZtiE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747661094; c=relaxed/simple; bh=5lBYU2soMNapngK8yzju9yIyoK8WawjPUAJammsreqg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=iTXX6T5H4b2ejG6tcquSVUmRKGsCegLjbjrZ/HA2C328vHYsSXIYqa7GkGsDhKwubWO6OyeylBII/mgjq0EeaYRHU8PQijO+IS4uI5aUjJtcwa69G0GmcbvGPd0kCu5wTSdbWo8fFuZ925ismtbsvJedRRD0lmigs/bMhAw7Ihc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E957385841E Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43d0618746bso34768075e9.2 for ; Mon, 19 May 2025 06:24:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747661093; x=1748265893; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rEcyYSXoQet6yQMd37xNrpPVKhx57egz/FACSRyai6o=; b=h6/d+0sMJuA9N9OZ90zRnzsa1CuSNnIqYJu0I8/UWb/ZLGQW9myzLqesJsIHIGRpqa Xh5YoOPiCjHA9fc24+aV+E96+p0ePNUZ90GHzuGoIw4z6x+/zESK4ppDwdv4ozcUd5Pc DpRQnKHHvYUnEvGSNmOKSefGfGQc9MQHhYdxUu27SCwZXF9y4fOtadrXgUamlzIZvHAk X4Gqff3xA67PiE9T40riJhXjwzkUjNbdb+W74GyIFbvBndtgTCNqNhnJW0EvtAbv13qE L41Avt7i/o/RdFRzacedRVacnxmxm7IIvJ8xImATaBlbDj6nVR7b11pEFWAq8Gdne/5M Yt/w== X-Gm-Message-State: AOJu0Yw9jRBKTLCvA5t9ehhWFDuLP9yuXrBrfjefKVKWe80yqwfpzAGI KSmyc8yzDLjEkZGVbsZ4sHyD65Ap2mOqVWyMBJJiNv6T9o3qeZuj5OZ7OQ/xkgYh X-Gm-Gg: ASbGncuiYBJWS+iUTmtEyq0MMPckib48J9/0v9Fz7B5tNaiElo1rO6dquOeYEhcFUWD FU6/lZz2DXX2LvBedjdB3ZPkyNU7OuEvVPLHoi9NhBlawNri7bm8FEUsM41xWoGthCRd4j5N+ht qRLjne6+Z+kBcg63yPPtWf/0bYa14z034bAMEW0e4z7uGjb6lM+VzzbnhpdIpXGHPj/YbzuHgC5 yjkxU6I9YVsz2/MTdMkBSkXwcuzfPtEq+DYJO53sfuNXVuS/BwLOZY0F9V+W41if9N8mvp7P5rZ O2rmzhx6eORjEQ9HijHq4lhNqZQ4S8sTtflCA6f6d2+JTfbD/iM= X-Google-Smtp-Source: AGHT+IGWjd/Di3XkQIK3mQncjlDfpBqHzp9GW/RdOvBZkWDSlqbi1rUa1Hitw/KyJ3H9QIRugf34pg== X-Received: by 2002:a5d:6982:0:b0:3a1:fd06:d1c with SMTP id ffacd0b85a97d-3a3600da2c9mr8931806f8f.46.1747661092985; Mon, 19 May 2025 06:24:52 -0700 (PDT) Received: from localhost ([2001:8a0:4fe9:b400:8d90:6f0d:36bf:32df]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a36749f622sm9013143f8f.93.2025.05.19.06.24.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 May 2025 06:24:52 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 33/47] Windows gdb: cygwin_set_dr => windows_set_dr, etc. Date: Mon, 19 May 2025 14:22:54 +0100 Message-ID: <20250519132308.3553663-34-pedro@palves.net> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519132308.3553663-1-pedro@palves.net> References: <20250519132308.3553663-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 The Windows backend functions that manipulate the x86 debug registers are called "cygwin_foo", which is outdated, because native MinGW gdb also uses those functions, they are not Cygwin-specific. Rename them to "windows_foo" to avoid confusion. Approved-By: Tom Tromey Change-Id: I46df3b44f5272adadf960da398342a3cbdb98533 --- gdb/windows-nat.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index d5acbc33f69..2c76848df58 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -207,11 +207,11 @@ enum debug_prefixed_printf_cond (debug_exceptions, "windows except", fmt, \ ## __VA_ARGS__) -static void cygwin_set_dr (int i, CORE_ADDR addr); -static void cygwin_set_dr7 (unsigned long val); -static CORE_ADDR cygwin_get_dr (int i); -static unsigned long cygwin_get_dr6 (void); -static unsigned long cygwin_get_dr7 (void); +static void windows_set_dr (int i, CORE_ADDR addr); +static void windows_set_dr7 (unsigned long val); +static CORE_ADDR windows_get_dr (int i); +static unsigned long windows_get_dr6 (void); +static unsigned long windows_get_dr7 (void); /* User options. */ static bool new_console = false; @@ -3090,11 +3090,11 @@ void _initialize_windows_nat (); void _initialize_windows_nat () { - x86_dr_low.set_control = cygwin_set_dr7; - x86_dr_low.set_addr = cygwin_set_dr; - x86_dr_low.get_addr = cygwin_get_dr; - x86_dr_low.get_status = cygwin_get_dr6; - x86_dr_low.get_control = cygwin_get_dr7; + x86_dr_low.set_control = windows_set_dr7; + x86_dr_low.set_addr = windows_set_dr; + x86_dr_low.get_addr = windows_get_dr; + x86_dr_low.get_status = windows_get_dr6; + x86_dr_low.get_control = windows_get_dr7; /* x86_dr_low.debug_register_length field is set by calling x86_set_debug_register_length function @@ -3199,10 +3199,10 @@ Use \"%ps\" or \"%ps\" command to load executable/libraries directly."), Here we just store the address in dr array, the registers will be actually set up when windows_continue is called. */ static void -cygwin_set_dr (int i, CORE_ADDR addr) +windows_set_dr (int i, CORE_ADDR addr) { if (i < 0 || i > 3) - internal_error (_("Invalid register %d in cygwin_set_dr.\n"), i); + internal_error (_("Invalid register %d in windows_set_dr.\n"), i); for (auto &th : windows_process.thread_list) th->debug_registers_changed = true; @@ -3212,7 +3212,7 @@ cygwin_set_dr (int i, CORE_ADDR addr) register. Here we just store the address in D_REGS, the watchpoint will be actually set up in windows_wait. */ static void -cygwin_set_dr7 (unsigned long val) +windows_set_dr7 (unsigned long val) { for (auto &th : windows_process.thread_list) th->debug_registers_changed = true; @@ -3221,7 +3221,7 @@ cygwin_set_dr7 (unsigned long val) /* Get the value of debug register I from the inferior. */ static CORE_ADDR -cygwin_get_dr (int i) +windows_get_dr (int i) { windows_thread_info *th = windows_process.find_thread (inferior_ptid); @@ -3252,18 +3252,18 @@ cygwin_get_dr (int i) inferior. */ static unsigned long -cygwin_get_dr6 (void) +windows_get_dr6 (void) { - return cygwin_get_dr (6); + return windows_get_dr (6); } /* Get the value of the DR7 debug status register from the inferior. */ static unsigned long -cygwin_get_dr7 (void) +windows_get_dr7 (void) { - return cygwin_get_dr (7); + return windows_get_dr (7); } /* Determine if the thread referenced by "ptid" is alive -- 2.49.0