This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [patch] "single step" atomic instruction sequences as a whole.


Mark Kettenis wrote:

> I suspect the write_pc call is there to make stepping delay-slot
> instructions work.

Maybe I'm confused, but I thought alpha didn't have delay slots?
There is a special gdbarch routine single_step_through_delay for
targets that have those ...

> > I don't have a way to test on alpha-linux unfortunately.  Do you?
> 
> I can test OpenBSD/alpha later this week if necessary.

Thanks for the offer!  (I just noticed that Linux/alpha doesn't use
software single-step anyway, but OpenBSD/alpha does.)

Would you mind testing this small patch that simply removes the
write_pc call?  All remaining changes should then be mechanical.

Thanks,
Ulrich

	* alpha-tdep.c (alpha_software_single_step): Do not call write_pc
	when removing single-step breakpoints.

Index: gdb/alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.163
diff -u -p -r1.163 alpha-tdep.c
--- gdb/alpha-tdep.c	12 Apr 2007 14:52:19 -0000	1.163
+++ gdb/alpha-tdep.c	12 Apr 2007 20:39:08 -0000
@@ -1521,7 +1521,7 @@ alpha_next_pc (CORE_ADDR pc)
 int
 alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p)
 {
-  static CORE_ADDR next_pc;
+  CORE_ADDR next_pc;
   CORE_ADDR pc;
 
   if (insert_breakpoints_p)
@@ -1534,7 +1534,6 @@ alpha_software_single_step (enum target_
   else
     {
       remove_single_step_breakpoints ();
-      write_pc (next_pc);
     }
   return 1;
 }


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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