]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove duplicate code from windows_nat_target::resume
authorHannes Domani <ssbssa@yahoo.de>
Fri, 23 Jan 2026 19:07:04 +0000 (20:07 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Fri, 23 Jan 2026 19:07:04 +0000 (20:07 +0100)
Updating the debug registers and calling SetThreadContext is already
done in windows_continue, called directly afterwards, so this removes it
from windows_nat_target::resume.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/windows-nat.c

index e86877b4c50b9ee6c0fea2a403b3556e3fd3a62e..a6fd199530cf101c576b128504c701c27d7180b9 100644 (file)
@@ -1378,22 +1378,6 @@ windows_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
              fetch_registers (regcache, gdbarch_ps_regnum (gdbarch));
              context->EFlags |= FLAG_TRACE_BIT;
            }
-
-         if (context->ContextFlags)
-           {
-             if (th->debug_registers_changed)
-               {
-                 context->Dr0 = windows_process.dr[0];
-                 context->Dr1 = windows_process.dr[1];
-                 context->Dr2 = windows_process.dr[2];
-                 context->Dr3 = windows_process.dr[3];
-                 context->Dr6 = DR6_CLEAR_VALUE;
-                 context->Dr7 = windows_process.dr[7];
-                 th->debug_registers_changed = false;
-               }
-             CHECK (set_thread_context (th->h, context));
-             context->ContextFlags = 0;
-           }
        });
     }