kdevelop drkonqi integration

George Kiagiadakis gkiagiad at csd.uoc.gr
Thu Apr 23 09:27:06 UTC 2009


On Thursday 23 April 2009 09:39:48 Andreas Pakulat wrote:
> Hi,
>
> On 21.04.09 17:06:48, George Kiagiadakis wrote:
> > 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)
>
> Are you sure the process needs to be running for gdb to attach to it? I
> would've thought that it should also be possible to attach gdb if its
> stopped.

Yes, gdb just hangs if you attempt to attach it on a stopped process. Maybe 
this is a gdb bug, I don't know... but to make it work correctly with drkonqi 
for now, we need to continue the process first.

> > 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.
>
> IMHO if someone wants to debug the application that crashes with either
> plain gdb or KDevelop we can assume that this person at least remotely
> knows what he does and doesn't need the crash handler anymore after
> finishing debugging the app. So I think your solution 2) of shutting
> down drkonqi2 when kdevelop has attached to the process is the right
> one.

Ok, so I think the plan should be this:
When the user clicks the "Debug in kdevelop" button, drkonqi sends a SIGCONT 
to the process and a signal to kdevelop that debugging should start. Then, 
Kdevelop attaches to the process first and then it calls 
org.kde.KApplication.quit() on drkonqi.

The only part of this plan that is not implemented yet, is calling quit() on 
drkonqi, and I guess this can be done easily.

> > 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...
>
> Hmm, I'm monitoring the kde-core list, so as soon as drkonqi2 replaced
> (or did that already happen and I just didn't notice?) the existing
> drkonqi I'll remove the "Debug in" part from the string for KDE 4.3.

No, it hasn't yet moved to trunk. I will notify k-c-d when it does.

Regards,
George





More information about the KDevelop-devel mailing list