kdevelop drkonqi integration

George Kiagiadakis gkiagiad at csd.uoc.gr
Tue Apr 21 14:06:48 UTC 2009


Hello everyone,

As discussed a few days ago on kde-core-devel, drkonqi2 currently has some 
problems with the kdevelop integration.

First of all, on k-c-d I mentioned that kdevelop doesn't send the required 
signal. I have tested that again today with latest trunk and it works fine. The 
last test was done by Dario, who probably did something wrong, not sure 
what... So, to make it clear, now it works like it did with the old drkonqi.

However, there is still a point I'm worried about. Drkonqi2 uses a state 
machine that stops the process (with SIGSTOP) when it is not being debugged. 
To start debugging with kdevelop, drkonqi has to enter the "debugger is 
running" state, where it sends a SIGCONT to the process (to allow gdb 
attaching on it) and disallows fetching a backtrace or starting debugging with 
gdb. So, after starting debugging with kdevelop, drkonqi is completely useless 
as it can't generate a backtrace and thus it is unable to report a bug.

There are two apparent solutions to this problem:
1) Send a signal when gdb in kdevelop has detached the process, so that 
drkonqi can enter its idle state again and stop the process.
2) Send a signal to drkonqi (or just call the standard 
org.kde.KApplication.quit() method) when gdb in kdevelop has attached the 
process, so that drkonqi can exit. Note here, though, that as soon as the 
attached process continues its execution, it will exit because it will not find 
drkonqi (this is how the KCrash handler works internally), so this needs some 
care to ensure that the attached process will not run at all after drkonqi has 
quit and before kdevelop is finished with debugging it.

Maybe the second solution makes more sense, but I'll let you decide :)

In addition, there is another minor issue. Kdevelop currently registers itself 
with the name "Debug in KDevelop", which appear as is on the button. This is 
not a problem, but I wonder if it would be better to register itself as 
"KDevelop" so that we can have control over the rest of the string. Currently, 
there is a "Debug" button-menu, which has two entries: "Debug in gdb", "Debug 
in KDevelop". It's kind of ugly that the first one is "Debug in 
<application>%1</application>" in the code, and the other one is just filled 
with what drkonqi receives over dbus. It is difficult to keep them consistent if 
one string needs to change, or if the translations from drkonqi and kdevelop 
are different...

So, what do you think?

Regards,
George

PS: Please keep me and Dario in CC, as we are not subscribed to this list. 
Thanks.





More information about the KDevelop-devel mailing list