public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove call to registers_changed from windows-nat.c
@ 2022-12-01 18:28 Tom Tromey
  2022-12-01 18:34 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2022-12-01 18:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

I noticed that windows_nat_target::interrupt calls registers_changed.
However, I don't think there's any reason to do this, because this
will happen automatically when the inferior stop is processed.
---
 gdb/windows-nat.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 17422e15f80..4b0760c5804 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2881,7 +2881,6 @@ windows_nat_target::interrupt ()
   DEBUG_EVENTS ("GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)");
   CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT,
 				   windows_process.current_event.dwProcessId));
-  registers_changed ();		/* refresh register state */
 }
 
 /* Helper for windows_xfer_partial that handles memory transfers.
-- 
2.34.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove call to registers_changed from windows-nat.c
  2022-12-01 18:28 [PATCH] Remove call to registers_changed from windows-nat.c Tom Tromey
@ 2022-12-01 18:34 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2022-12-01 18:34 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 12/1/22 13:28, Tom Tromey via Gdb-patches wrote:
> I noticed that windows_nat_target::interrupt calls registers_changed.
> However, I don't think there's any reason to do this, because this
> will happen automatically when the inferior stop is processed.
> ---
>  gdb/windows-nat.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index 17422e15f80..4b0760c5804 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -2881,7 +2881,6 @@ windows_nat_target::interrupt ()
>    DEBUG_EVENTS ("GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)");
>    CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT,
>  				   windows_process.current_event.dwProcessId));
> -  registers_changed ();		/* refresh register state */
>  }
>  
>  /* Helper for windows_xfer_partial that handles memory transfers.
> -- 
> 2.34.3
> 

Makes sense to me,

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-01 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 18:28 [PATCH] Remove call to registers_changed from windows-nat.c Tom Tromey
2022-12-01 18:34 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).