2007-06-06 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 6 Jun 2007 15:38:56 +0000 (15:38 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 6 Jun 2007 15:38:56 +0000 (15:38 +0000)
* gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Replace by
gdbarch_have_nonsteppable_watchpoint.
* infrun.c (handle_inferior_event, adjust_pc_after_break): Likewise.
* gdbarch.sh (CANNOT_STEP_BREAKPOINT): Replace by
gdbarch_cannot_step_breakpoint.
* infrun.c (resume): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/infrun.c

index ecc178971c12c3d9753841d8d97e9aa1803b1e50..766de2d2bbc87fd9f8ffd2f05099db70d53f12ef 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-06  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (HAVE_NONSTEPPABLE_WATCHPOINT): Replace by
+       gdbarch_have_nonsteppable_watchpoint.
+       * infrun.c (handle_inferior_event, adjust_pc_after_break): Likewise.
+       * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Replace by
+       gdbarch_cannot_step_breakpoint.
+       * infrun.c (resume): Likewise.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-06  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (FRAME_ARGS_SKIP): Replace by gdbarch_frame_args_skip.
index 91624f1fc93a48af174bac1358abdc1c424c6f99..cc1ba62f3aa57a7b6357158f15ae3b2f988f6a11 100644 (file)
@@ -754,11 +754,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
                       (long) current_gdbarch->cannot_fetch_register);
-#ifdef CANNOT_STEP_BREAKPOINT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
-                      XSTRING (CANNOT_STEP_BREAKPOINT));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: cannot_step_breakpoint = %s\n",
                       paddr_d (current_gdbarch->cannot_step_breakpoint));
@@ -1020,11 +1015,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
                       (long) current_gdbarch->get_longjmp_target);
-#ifdef HAVE_NONSTEPPABLE_WATCHPOINT
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
-                      XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
                       paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
index 64c48c7914f1bfddcbc215f91aba2020c02fa659..2446a3141d2e75be3caad2f72eca96b172553594 100644 (file)
@@ -1076,21 +1076,9 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na
 
 extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
 extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
-#if !defined (GDB_TM_FILE) && defined (CANNOT_STEP_BREAKPOINT)
-#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
-#endif
-#if !defined (CANNOT_STEP_BREAKPOINT)
-#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
-#endif
 
 extern int gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch);
 extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, int have_nonsteppable_watchpoint);
-#if !defined (GDB_TM_FILE) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
-#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
-#endif
-#if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
-#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
-#endif
 
 #if defined (ADDRESS_CLASS_TYPE_FLAGS)
 /* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
index 97a0bfb2fd223dae5edefe08e77d8dbe481897e8..ca298b875543fbba699d53625905975080fdaa9d 100755 (executable)
@@ -654,8 +654,8 @@ m::char *:construct_inferior_arguments:int argc, char **argv:argc, argv::constru
 f::void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0
 f::void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0
 v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC
-v:=:int:cannot_step_breakpoint:::0:0::0
-v:=:int:have_nonsteppable_watchpoint:::0:0::0
+v::int:cannot_step_breakpoint:::0:0::0
+v::int:have_nonsteppable_watchpoint:::0:0::0
 F:=:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
 M::const char *:address_class_type_flags_to_name:int type_flags:type_flags
 M::int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
index 3eb06826220f2bf1a96f376a4a6e210eedfa3004..dc6d8941ccf7220fe9c4e97b50b2913f7725ad69 100644 (file)
@@ -600,7 +600,7 @@ a command like `return' or `jump' to continue execution."));
          resume_ptid = inferior_ptid;
        }
 
-      if (CANNOT_STEP_BREAKPOINT)
+      if (gdbarch_cannot_step_breakpoint (current_gdbarch))
        {
          /* Most targets can step a breakpoint instruction, thus
             executing it normally.  But if this one cannot, just
@@ -1166,11 +1166,11 @@ adjust_pc_after_break (struct execution_control_state *ecs)
      these signals at breakpoints (the code has been in GDB since at least
      1992) so I can not guess how to handle them here.
 
-     In earlier versions of GDB, a target with HAVE_NONSTEPPABLE_WATCHPOINTS
-     would have the PC after hitting a watchpoint affected by
-     DECR_PC_AFTER_BREAK.  I haven't found any target with both of these set
-     in GDB history, and it seems unlikely to be correct, so
-     HAVE_NONSTEPPABLE_WATCHPOINTS is not checked here.  */
+     In earlier versions of GDB, a target with 
+     gdbarch_have_nonsteppable_watchpoint would have the PC after hitting a
+     watchpoint affected by DECR_PC_AFTER_BREAK.  I haven't found any target
+     with both of these set in GDB history, and it seems unlikely to be correct,
+     so gdbarch_have_nonsteppable_watchpoint is not checked here.  */
 
   if (ecs->ws.kind != TARGET_WAITKIND_STOPPED)
     return;
@@ -1761,7 +1761,8 @@ handle_inferior_event (struct execution_control_state *ecs)
   /* It is far more common to need to disable a watchpoint to step
      the inferior over it.  FIXME.  What else might a debug
      register or page protection watchpoint scheme need here?  */
-  if (HAVE_NONSTEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
+  if (gdbarch_have_nonsteppable_watchpoint (current_gdbarch)
+      && STOPPED_BY_WATCHPOINT (ecs->ws))
     {
       /* At this point, we are stopped at an instruction which has
          attempted to write to a piece of memory under control of