Automatic date update in version.in
[platform/upstream/binutils.git] / gdb / x86-nat.c
index 6a0ca4b..00274d3 100644 (file)
@@ -33,9 +33,6 @@
    The functions below implement debug registers sharing by reference
    counts, and allow to watch regions up to 16 bytes long.  */
 
-/* Whether or not to print the mirrored debug registers.  */
-int debug_hw_points;
-
 /* Low-level function vector.  */
 struct x86_dr_low_type x86_dr_low;
 
@@ -214,7 +211,7 @@ x86_stopped_by_watchpoint (struct target_ops *ops)
   return x86_dr_stopped_by_watchpoint (state);
 }
 
-/* Insert a hardware-assisted breakpoint at BP_TGT->placed_address.
+/* Insert a hardware-assisted breakpoint at BP_TGT->reqstd_address.
    Return 0 on success, EBUSY on failure.  */
 
 static int
@@ -224,6 +221,7 @@ x86_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
   struct x86_debug_reg_state *state
     = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
 
+  bp_tgt->placed_address = bp_tgt->reqstd_address;
   return x86_dr_insert_watchpoint (state, hw_execute,
                                   bp_tgt->placed_address, 1) ? EBUSY : 0;
 }
@@ -272,7 +270,7 @@ add_show_debug_regs_command (void)
   /* A maintenance command to enable printing the internal DRi mirror
      variables.  */
   add_setshow_boolean_cmd ("show-debug-regs", class_maintenance,
-                          &debug_hw_points, _("\
+                          &show_debug_regs, _("\
 Set whether to show variables that mirror the x86 debug registers."), _("\
 Show whether to show variables that mirror the x86 debug registers."), _("\
 Use \"on\" to enable, \"off\" to disable.\n\