Review Request 121442: gdb: Refactoring of GDB/MI and state tracking (work in progress)

Nicolai Hähnle nhaehnle at gmail.com
Thu Dec 11 08:20:39 UTC 2014



> On Dez. 10, 2014, 10:48 nachm., Milian Wolff wrote:
> > Yes! So awesome. Really, Nicolai - I'd be very pleased if you continue working in this direction. As I wrote on the kdevelop-devel ML a few weeks ago, we are in dire need of someone to maintain and fix the GDB plugin. Seem's like we finally found someone? :)
> > 
> > I share your analysis, btw. The plugin should be reactive and it's current design often leads to unexpected failures. Also note that even without your changes, some tests are failing... 
> > 
> > And you should really request a developer account. You'll need it, sooner rather than later. https://techbase.kde.org/Contribute/Get_a_Contributor_Account
> > 
> > Thanks again!

Great, I'll do that then and continue with this project; I've also made a note of the tree that Andreas mentioned, there seem to be some nice enhancenments there as well!


- Nicolai


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121442/#review71762
-----------------------------------------------------------


On Dez. 10, 2014, 10:07 nachm., Nicolai Hähnle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121442/
> -----------------------------------------------------------
> 
> (Updated Dez. 10, 2014, 10:07 nachm.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Please excuse what is probably a bit of an abuse of the system. I wanted to use KDevelop in remote debugging and ran into trouble because it gets horribly confused when user commands (including from a GDB setup script as specified in the Launch Configuration) modify certain kinds of state. I started working on this and things kind of escalated, so I wanted to put something out there ASAP to let you know that I'm working on this and to get feedback on the direction this is going.
> 
> The overall direction of those changes is to modify the gdb plugin such that it picks up state changes (running state, breakpoints, etc.) based on the async notifications rather than based on the command it sends itself. This is crucial for handling correctly the case where the user enters a command such as "continue" directly in the GDB view, or (more importantly for my use case) to handle at all the case where I set up a GDB script to attach to a remote target.
> 
> The first milestone I set for myself is being able to do *any* remote debugging in my particular use case at all, while keeping the unit tests working correctly. Longer term, I hope to be able to fix the breakpoint handling so that it picks up breakpoints set outside the control of KDevelop, and other similar issues as they come up.
> 
> This is a series of patches, the headlines of which are currently:
> 
> gdb: remove unused QueueWhileInterrupted mode from the command queue
> gdb: do not use addCommandToFront in DisassembleWidget
> gdb: DebugSession: add a testing mode for unit tests
> gdb: match structure more closely to the GDB/MI documentation and use cmd tokens
> gdb: always process async notifications from GDB
> gdb: remove magic constants in GDBMI::StreamRecord
> gdb: remove flaky DebugSession::parseStreamRecord
> gdb: add braces around multi-line if statement
> gdb: examineCoreFile: update IDebugSession::state() to match unit tests
> gdb: update session state more robustly based on async notifications
> 
> 
> Diffs
> -----
> 
>   debuggers/gdb/breakpointcontroller.cpp d5ba5dd 
>   debuggers/gdb/debuggerplugin.h 4c6bb07 
>   debuggers/gdb/debugsession.h dbe06c5 
>   debuggers/gdb/debugsession.cpp 63f9a58 
>   debuggers/gdb/disassemblewidget.cpp 67024cf 
>   debuggers/gdb/gdb.h 31688cd 
>   debuggers/gdb/gdb.cpp 4dc7b5d 
>   debuggers/gdb/gdbcommand.h fb23c47 
>   debuggers/gdb/gdbcommand.cpp 67abbd8 
>   debuggers/gdb/gdbcommandqueue.h 7d82f45 
>   debuggers/gdb/gdbcommandqueue.cpp 801bc41 
>   debuggers/gdb/DESIGN.txt ddefb70 
>   debuggers/gdb/breakpointcontroller.h 1b8ae0e 
>   debuggers/gdb/gdbglobal.h ef31c02 
>   debuggers/gdb/mi/gdbmi.h d5e92b8 
>   debuggers/gdb/mi/miparser.h 7096af0 
>   debuggers/gdb/mi/miparser.cpp 123c97e 
>   debuggers/gdb/unittests/test_gdb.h b9a961d 
>   debuggers/gdb/unittests/test_gdb.cpp 03a1203 
>   debuggers/gdb/variablecontroller.h f5ac8c1 
>   debuggers/gdb/variablecontroller.cpp 5eb9908 
> 
> Diff: https://git.reviewboard.kde.org/r/121442/diff/
> 
> 
> Testing
> -------
> 
> currently not ready for merging; several unit tests fail in subtle ways
> 
> 
> Thanks,
> 
> Nicolai Hähnle
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20141211/add48cfb/attachment.html>


More information about the KDevelop-devel mailing list