Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Splitting debugger in two - specific debugger and common GUI
oBFusCATed:
--- Quote from: MortenMacFly on September 18, 2009, 03:48:14 pm ---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.
--- End quote ---
Are you sure about that the editor starts at 1, my observations are that it starts at 0.
I think, I made the debugger breakpoints to start from 1.
For me the gdb/cdb debuggers should be split in two separate plugins.
I've started the implementation of the gdb only plugin (using the MI interface).
And another thing: the duplication is needed because the outside world, should not see the implementation details (the temporary breakpoint in the current example)
p.s. this bug are caused by the late redesign of the breakpoints interface I made, so I'm sorry for the cases I've not tested
p.p.s. I can do the redesign to remove the duplication, but I'm sure I'll break more staff than that cause by the duplication
mariocup:
Hi oBFusCATed,
I just had a look at your debugger modifications and the watch window is nice. I would prefer the same view also for the CPU register window (with switching of the display format too) with the possibility to edit values.
For embedded controller I see the necessity to edit values of the CPU registers or memory (view) etc. Do you intend to modify also these components.
oBFusCATed:
I could do it some day, but I've never used the CPU registers window, so I have very little motivation to do it.
I'm using the memory window more often, so there is bigger chance for improvements there.
But you never, know if I have nothing to do I can do it.
Also I think the modifications should be made by a person using the window, because he/she would know what is important and what not.
Best regards...
oBFusCATed:
Here is a patch that fixes the parsing the GDB output, generated by "output var", when "var" is a reference.
--- Code: ---Index: src/plugins/debuggergdb/parsewatchvalue.cpp
===================================================================
--- src/plugins/debuggergdb/parsewatchvalue.cpp (revision 5826)
+++ src/plugins/debuggergdb/parsewatchvalue.cpp (working copy)
@@ -314,12 +314,20 @@
return true;
}
- if(value[0] == wxT('{') && value[value.length() - 1] == wxT('}'))
+ // Try to find the first brace.
+ // If the watch is for a reference the brace is not at position = 0
+ wxString::size_type start = value.find(wxT('{'));
+
+ if(start != wxString::npos && value[value.length() - 1] == wxT('}'))
{
- int start = 1;
- bool result = ParseGDBWatchValue(watch, value, start, value.length() - 2);
+ int t_start = start + 1;
+ bool result = ParseGDBWatchValue(watch, value, t_start, value.length() - 2);
if(result)
+ {
+ if(start > 0)
+ watch.SetValue(value.substr(0, start));
watch.RemoveChildren(true);
+ }
return result;
}
else
--- End code ---
oBFusCATed:
Here is another patch, that tries to fix various breakpoint problems and little bugs
http://smrt.is-a-geek.org/codeblocks/dbg_refactor/fix_breakpoints.patch
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version