Review Request: Fix order of handling of command results in GDB plugin.

Niko Sams niko.sams at gmail.com
Thu Mar 10 02:39:50 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100831/#review1878
-----------------------------------------------------------


Please try to write a unit test that shows the problem. (might be a bit hard tough)

And there is already a Command Queue in DebugSession, and iirc only one command must be active at a time. I think the problem that should be fixed is that a command is sent before the previous finished. It should be possible to debug this with an unit test.

- Niko


On March 10, 2011, 12:15 a.m., Dmitry Risenberg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100831/
> -----------------------------------------------------------
> 
> (Updated March 10, 2011, 12:15 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> This patch stores the commands sent to GDB via MI in a queue and applies all output to the queue head. When a result record is received, the queue head is popped.
> 
> This fixes a bug: when running GDB debugging sessions in KDevelop, sometimes the "Internal debugger error" message box pops up with "^done" or "^error".
> This happens when multiple commands are submitted to GDB (one of them from text hint for variable, for example), and one of them receives the result intended for another one. Could not reliably reproduce this, but often happens when breaking in AStylePlugin::formatSourceWithStyle and stepping through it. That could also be a reason for hanging of GDB when 'ready_for_next_command' does not get set correctly.
> 
> Btw, I think GDB::processLine might be improved even more, by distinguishing which types of output do need a command and which do not. Also, is 'ready_for_next_command' necessary at all now?
> 
> 
> Diffs
> -----
> 
>   debuggers/gdb/gdb.h d695062cb2a247c4eea62743f8cc1bc8e93851f9 
>   debuggers/gdb/gdb.cpp 02e23faca971f8be7d28ede40e0b471ab2e44a9f 
> 
> Diff: http://git.reviewboard.kde.org/r/100831/diff
> 
> 
> Testing
> -------
> 
> Manually tested scenario that previously often produced the "Internal debugger error" message.
> 
> 
> Thanks,
> 
> Dmitry
> 
>

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


More information about the KDevelop-devel mailing list