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]

[commit] Keep the frame PC's in sync (hack++)


Hello,

This patch hacks the existing deprecated_update_frame_pc_hack(). When updating the frame's PC, it now also update's the cached PC value in the previous frame. It could potentially affect any decr pc after break target (alpha, i386, ...). I was noticing problems with the d10v.

(mumble something about needing to make "struct frame_info" opaque.)
(mumble something about needing to eliminate decr pc after break.)

committed,
Andrew
2003-03-05  Andrew Cagney  <cagney at redhat dot com>

	* frame.c (deprecated_update_frame_pc_hack): Also update the the
	cached PC value in the next frame.

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.72
diff -u -r1.72 frame.c
--- frame.c	5 Mar 2003 18:51:17 -0000	1.72
+++ frame.c	5 Mar 2003 20:01:28 -0000
@@ -1503,8 +1503,13 @@
 deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
 {
   /* See comment in "frame.h".  */
-  gdb_assert (frame->next != NULL);
   frame->pc = pc;
+  /* While we're at it, update this frame's cached PC value, found in
+     the next frame.  Oh, for the day when "struct frame_info" is
+     opaque and this hack on hack can go.  */
+  gdb_assert (frame->next != NULL);
+  frame->next->pc_unwind_cache = pc;
+  frame->next->pc_unwind_cache_p = 1;
 }
 
 void

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