From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id C01DC385840A; Wed, 2 Nov 2022 14:37:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C01DC385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667399854; bh=bjyhxaEWSRUJooMX+ph6eDwVXgSXtNJWbp1Ppszjv2c=; h=From:To:Subject:Date:From; b=umxNi1n7JiW7J+9OSDauS8XdwmxKhxhgIeShr/mWA9bq5uYoAduut5HMar3alTNv/ uv9DhydKcTnXe1sLYHyRH6obqBB/WLFyxzdVRikPaXfnFWV3kO1KLYEVeBcZkd54Xm 2DeU8NwfTuIFHlP5YLr3vB/ENfAU5XLs73Fz74GQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix Cygwin build after 20489cca X-Act-Checkin: binutils-gdb X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 559a5ea452455d95ff18736ce6dfa9065427f74e X-Git-Newrev: 26f228db710f54b54aea4d9a05214add0cf9f541 Message-Id: <20221102143734.C01DC385840A@sourceware.org> Date: Wed, 2 Nov 2022 14:37:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D26f228db710f= 54b54aea4d9a05214add0cf9f541 commit 26f228db710f54b54aea4d9a05214add0cf9f541 Author: Jon Turney Date: Sun Jun 12 16:59:40 2022 +0100 Fix Cygwin build after 20489cca =20 Update code under __CYGWIN__ which accesses inferior process information which is now stored in windows_process_info rather than globals. Diff: --- 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 77ab2706fff..ab94de03bbf 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -726,15 +726,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 =3D 0; + windows_process.have_saved_context =3D 0; } else #endif @@ -922,9 +922,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 =3D (CORE_ADDR) (uintptr_t) ((char *) - load_addr + 0x1000); - cygwin_load_end =3D cygwin_load_start + bfd_section_size (text); + windows_process.cygwin_load_start =3D (CORE_ADDR) (uintptr_t) ((char= *) + load_addr + 0x1000); + windows_process.cygwin_load_end =3D windows_process.cygwin_load_star= t + + bfd_section_size (text); } #endif =20 @@ -1919,7 +1920,8 @@ windows_nat_target::do_initial_windows_stuff (DWORD p= id, bool attaching) i++) windows_process.dr[i] =3D 0; #ifdef __CYGWIN__ - cygwin_load_start =3D cygwin_load_end =3D 0; + windows_process.cygwin_load_start =3D 0; + windows_process.cygwin_load_end =3D 0; #endif windows_process.current_event.dwProcessId =3D pid; memset (&windows_process.current_event, 0,