Hello,

When setting a breakpoint to a location that is not yet loaded into the
current binary (we call that a pending breakpoint), Nemiver wrongly
tries to disassemble the (not yet loaded) location of that breakpoint.
The disassembling fails, of course, and the user is left with an empty
disassembly source view.  Woops.

The patch below fixes this mess by avoiding to graphically append
/pending/ breakpoints to the perspective, altogether.

From: Dodji Seketeli <[email protected]>
Date: Sun, 4 Sep 2011 21:39:35 +0200
Subject: [PATCH 4/4] 632305 Avoid disassembling location of pending breakpoint

        * src/persp/dbgperspective/nmv-dbg-perspective.cc
        (DBGPerspective::append_breakpoint): Don't try to graphically
        append a /pending/ breakpoint.
---
 src/persp/dbgperspective/nmv-dbg-perspective.cc |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc 
b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 99ef2bf..f4dc2f9 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -6658,10 +6658,15 @@ DBGPerspective::append_breakpoint (const 
IDebugger::Breakpoint &a_breakpoint)
     m_priv->breakpoints[a_breakpoint.number ()] = a_breakpoint;
     m_priv->breakpoints[a_breakpoint.number ()].file_full_name (file_path);
 
-    // We don't know how to graphically represent non-standard
-    // breakpoints (e.g watchpoints) at this moment.
-    if (type != IDebugger::Breakpoint::STANDARD_BREAKPOINT_TYPE
-        && type != IDebugger::Breakpoint::COUNTPOINT_TYPE)
+
+    if (// We don't know how to graphically represent non-standard
+        // breakpoints (e.g watchpoints) at this moment, so let's not
+        // bother trying to graphically represent them.
+        (type != IDebugger::Breakpoint::STANDARD_BREAKPOINT_TYPE
+         && type != IDebugger::Breakpoint::COUNTPOINT_TYPE)
+        // Let's not bother trying to to graphically represent a
+        // pending breakpoint, either.
+        || a_breakpoint.is_pending ())
         return;
 
     editor = get_or_append_source_editor_from_path (file_path);
-- 
                Dodji
_______________________________________________
nemiver-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nemiver-list

Reply via email to