Handle var_zuinteger and var_zuinteger_unlimited from Python
[deliverable/binutils-gdb.git] / gdb / x86-nat.c
index b0315e2eafd3e1464605fc8875469df6ee43c76f..bec51373a66c92262a80833a707de91c8be2be28 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for x86 (i386 and x86-64).
 
-   Copyright (C) 2001-2016 Free Software Foundation, Inc.
+   Copyright (C) 2001-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -260,6 +260,18 @@ x86_can_use_hw_breakpoint (struct target_ops *self,
   return 1;
 }
 
+/* Return non-zero if the inferior has some breakpoint that triggered.
+   Otherwise return zero.  */
+
+static int
+x86_stopped_by_hw_breakpoint (struct target_ops *ops)
+{
+  struct x86_debug_reg_state *state
+    = x86_debug_reg_state (ptid_get_pid (inferior_ptid));
+
+  return x86_dr_stopped_by_hw_breakpoint (state);
+}
+
 static void
 add_show_debug_regs_command (void)
 {
@@ -297,6 +309,11 @@ x86_use_watchpoints (struct target_ops *t)
   t->to_remove_watchpoint = x86_remove_watchpoint;
   t->to_insert_hw_breakpoint = x86_insert_hw_breakpoint;
   t->to_remove_hw_breakpoint = x86_remove_hw_breakpoint;
+
+  /* A target must provide an implementation of the
+     "to_supports_stopped_by_hw_breakpoint" target method before this
+     callback will be used.  */
+  t->to_stopped_by_hw_breakpoint = x86_stopped_by_hw_breakpoint;
 }
 
 void
This page took 0.024352 seconds and 4 git commands to generate.