From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-048.btinternet.com (mailomta12-sa.btinternet.com [213.120.69.18]) by sourceware.org (Postfix) with ESMTPS id 282CA385829A for ; Sun, 12 Jun 2022 16:28:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 282CA385829A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-001.btmx-prd.synchronoss.net ([10.2.38.4]) by sa-prd-fep-048.btinternet.com with ESMTP id <20220612162802.DTWB3226.sa-prd-fep-048.btinternet.com@sa-prd-rgout-001.btmx-prd.synchronoss.net>; Sun, 12 Jun 2022 17:28:02 +0100 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613006A92A3F9B13 X-Originating-IP: [86.139.167.41] X-OWM-Source-IP: 86.139.167.41 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrtddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeliedtjefhtdevkeehueegffegveeftdejjeevfefhiefffeektddvteehheeijeenucfkphepkeeirddufeelrdduieejrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehlohgtrghlhhhoshhtrdhlohgtrghlughomhgrihhnpdhinhgvthepkeeirddufeelrdduieejrdeguddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgpdhrtghpthhtohepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgtphhtthhopehtrhhomhgvhiesrggurggtohhrvgdrtghomh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (86.139.167.41) by sa-prd-rgout-001.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613006A92A3F9B13; Sun, 12 Jun 2022 17:28:02 +0100 From: Jon Turney To: gdb-patches@sourceware.org Cc: Tom Tromey , Jon Turney Subject: [PATCH] Fix Cygwin build after 20489cca Date: Sun, 12 Jun 2022 17:27:42 +0100 Message-Id: <20220612162742.8105-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220407195606.1847158-3-tromey@adacore.com> References: <20220407195606.1847158-3-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1198.7 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2022 16:28:04 -0000 Update code under __CYGWIN__ which accesses inferior process information which is now stored in windows_process_info rather than globals. --- gdb/windows-nat.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 9705fa33cc2..553b9ba45ce 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -553,15 +553,15 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r) if (th->reload_context) { #ifdef __CYGWIN__ - if (have_saved_context) + if (windows_process.have_saved_context) { /* Lie about where the program actually is stopped since cygwin has informed us that we should consider the signal to have occurred at another location which is stored in "saved_context. */ - memcpy (&th->context, &saved_context, + memcpy (&th->context, &windows_process.saved_context, __COPY_CONTEXT_SIZE); - have_saved_context = 0; + windows_process.have_saved_context = 0; } else #endif @@ -749,9 +749,10 @@ windows_make_so (const char *name, LPVOID load_addr) /* The symbols in a dll are offset by 0x1000, which is the offset from 0 of the first byte in an image - because of the file header and the section alignment. */ - cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *) - load_addr + 0x1000); - cygwin_load_end = cygwin_load_start + bfd_section_size (text); + windows_process.cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *) + load_addr + 0x1000); + windows_process.cygwin_load_end = windows_process.cygwin_load_start + + bfd_section_size (text); } #endif @@ -1731,7 +1732,8 @@ windows_nat_target::do_initial_windows_stuff (DWORD pid, bool attaching) i++) windows_process.dr[i] = 0; #ifdef __CYGWIN__ - cygwin_load_start = cygwin_load_end = 0; + windows_process.cygwin_load_start = 0; + windows_process.cygwin_load_end = 0; #endif windows_process.current_event.dwProcessId = pid; memset (&windows_process.current_event, 0, -- 2.36.1