[nemiver/remote-load-on-connect] Fix possible offset in current frame address



commit c841d62fdc504ad51036d236fc9258da97bbd70f
Author: Dodji Seketeli <dodji seketeli org>
Date:   Sat Nov 26 18:18:01 2011 +0100

    Fix possible offset in current frame address
    
    	* src/persp/dbgperspective/nmv-call-stack.cc
    	(CallStack::Priv::on_frames_listed):  Detect possible offset in current
    	frame address, fix it, and let the system know.

 src/persp/dbgperspective/nmv-call-stack.cc |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-call-stack.cc b/src/persp/dbgperspective/nmv-call-stack.cc
index e3a140b..489e53f 100644
--- a/src/persp/dbgperspective/nmv-call-stack.cc
+++ b/src/persp/dbgperspective/nmv-call-stack.cc
@@ -348,6 +348,15 @@ struct CallStack::Priv {
         // we will update the call stack with those.
         set_frame_list (a_stack, frames_args);
 
+	// If the current instruction pointer changed without the
+	// debugging engine telling us so, but we could detect that by
+	// querying the frame list, let's update our current state
+	// accordingly.
+	if (cur_frame_index == 0 && frames.front () != cur_frame) {
+	  cur_frame = frames.front ();
+	  frame_selected_signal.emit (cur_frame_index, cur_frame);
+	}
+
         // Okay so now, ask for frame arguments matching the frames we
         // just received.
         debugger->list_frames_arguments (a_stack[0].level (),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]