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 ecc1789..766de2d 100644 (file)
@@ -1,5 +1,15 @@
 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.
        * stack.c (print_frame_args): Likewise.
        * gdbarch.sh (FRAME_NUM_ARGS): Replace by gdbarch_frame_num_args.
index 91624f1..cc1ba62 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 64c48c7..2446a31 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 97a0bfb..ca298b8 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 3eb0682..dc6d894 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