This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/in] Multi-arch CANNOT_STEP_BREAKPOINT


FYI,

This adds the variable CANNOT_STEP_BREAKPOINT to the architecture vector.

Very straight forward ... (I hope :-),

Andrew
2002-10-02  Andrew Cagney  <ac131313@redhat.com>

	* infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C.
	* gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add.
	* gdbarch.h, gdbarch.c: Re-generate.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.162
diff -u -r1.162 gdbarch.sh
--- gdbarch.sh	18 Sep 2002 15:37:18 -0000	1.162
+++ gdbarch.sh	2 Oct 2002 23:24:47 -0000
@@ -662,6 +662,7 @@
 f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
 f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
 v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0
+v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
 EOF
 }
 
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.71
diff -u -r1.71 infrun.c
--- infrun.c	18 Sep 2002 22:44:31 -0000	1.71
+++ infrun.c	2 Oct 2002 23:24:47 -0000
@@ -870,13 +870,14 @@
 	  resume_ptid = inferior_ptid;
 	}
 
-#ifdef CANNOT_STEP_BREAKPOINT
-      /* Most targets can step a breakpoint instruction, thus executing it
-         normally.  But if this one cannot, just continue and we will hit
-         it anyway.  */
-      if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
-	step = 0;
-#endif
+      if (CANNOT_STEP_BREAKPOINT)
+	{
+	  /* Most targets can step a breakpoint instruction, thus
+	     executing it normally.  But if this one cannot, just
+	     continue and we will hit it anyway.  */
+	  if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
+	    step = 0;
+	}
       target_resume (resume_ptid, step, sig);
     }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]