Remove call to registers_changed from windows-nat.c

Message ID 20221201182857.2591740-1-tromey@adacore.com
State Committed
Commit 4cb80f0e5bddc29cf50b08f0a4d2cca8ea330a23
Headers
Series Remove call to registers_changed from windows-nat.c |

Commit Message

Tom Tromey Dec. 1, 2022, 6:28 p.m. UTC
  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(-)
  

Comments

Simon Marchi Dec. 1, 2022, 6:34 p.m. UTC | #1
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
  

Patch

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.