Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb shnbsd_software_single_step: fix ...



details:   https://anonhg.NetBSD.org/src/rev/ffd3393bfada
branches:  trunk
changeset: 770757:ffd3393bfada
user:      uwe <uwe%NetBSD.org@localhost>
date:      Mon Oct 31 23:10:16 2011 +0000

description:
shnbsd_software_single_step: fix logic botch.  Now that removal of
software single step breakpoints is handled by the caller we no longer
need to keep static next_pc around.

diffstat:

 external/gpl3/gdb/dist/gdb/shnbsd-tdep.c |  5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diffs (19 lines):

diff -r cb51cd14cd34 -r ffd3393bfada external/gpl3/gdb/dist/gdb/shnbsd-tdep.c
--- a/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c  Mon Oct 31 21:31:29 2011 +0000
+++ b/external/gpl3/gdb/dist/gdb/shnbsd-tdep.c  Mon Oct 31 23:10:16 2011 +0000
@@ -359,14 +359,11 @@
 int
 shnbsd_software_single_step (struct frame_info *frame)
 {
-  static CORE_ADDR next_pc;
   struct gdbarch *gdbarch = get_frame_arch (frame);
   struct address_space *aspace = get_frame_address_space (frame);
   struct regcache  *regcache= get_current_regcache ();
   CORE_ADDR pc = regcache_read_pc (regcache);
-
-  if (pc != next_pc)
-    next_pc = shnbsd_get_next_pc (regcache, pc);
+  CORE_ADDR next_pc = shnbsd_get_next_pc (regcache, pc);
 
   insert_single_step_breakpoint (gdbarch, aspace, next_pc);
   return 1;



Home | Main Index | Thread Index | Old Index