Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Splitting debugger in two - specific debugger and common GUI

<< < (19/136) > >>

MortenMacFly:

--- Quote from: oBFusCATed on September 18, 2009, 02:16:51 pm ---Thanks for the report, I'll look at it in a minute

--- End quote ---
Please see my note in the  (edited) post before yours...

oBFusCATed:

--- Quote from: MortenMacFly on September 18, 2009, 02:15:59 pm ---Edit: What is not clear to me: Why are the BP's handled one time in m_State and another time in m_breakpoints?! There is a funny mixture of what is being used inside debuggergdb. It's not clear to me when which version is right...?!

--- End quote ---
I didn't want to mess with the plugin code too much. So I settled for some code duplication.

Here is the fix, but maybe I should extract this and the other notifications, so all plugins implement it by default :)

--- Code: ---Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp     (revision 5809)
+++ src/plugins/debuggergdb/debuggergdb.cpp     (working copy)
@@ -2008,7 +2008,7 @@
             bpFileName.Normalize();
             edFileName.Normalize();
             if (bpFileName.GetFullPath().Matches(edFileName.GetFullPath()))
-                ed->ToggleBreakpoint(bp->line, false);
+                ed->ToggleBreakpoint(bp->line - 1, false);
         }
         // Now check and highlight the active line under debugging
         if (m_State.HasDriver())

--- End code ---

Jenna:
The patch works, but ...

If I add a BP with the context-menu it does not appear in the list, if I then add another BP with a left-click in the margin, both are listed.

MortenMacFly:

--- Quote from: oBFusCATed on September 18, 2009, 02:54:22 pm ---I didn't want to mess with the plugin code too much. So I settled for some code duplication.

--- End quote ---
I understand why, but I think we seriously need to clean that up. In the past we had watches, breakpoints in the driver and needed to "synch" them with the BP's (in the editors). It was already confusing as the editors have a different indexing (an editor starts with line 1, a BP with line 0). Now that we have watches and BP's duplicated in the debugger, too we need to take care to "synch" 5 instances. This will lead to a lot of errors like Jens is experiencing.

If you realise that the "driver" is actually the instance of the debugger I think it's most plausible to keep the implementation in the "state" and remove it again from the debugger instance.

MortenMacFly:

--- Quote from: jens on September 18, 2009, 03:02:44 pm ---If I add a BP with the context-menu it does not appear in the list, if I then add another BP with a left-click in the margin, both are listed.

--- End quote ---
I fixed that, too and committed both fixes to the branch.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version