D-Bus problem

Ralf Habacker ralf.habacker at freenet.de
Fri May 18 15:08:47 CEST 2007


Andreas Pakulat schrieb:
> On 17.05.07 23:18:24, Ralf Habacker wrote:
>   
>> Andreas Pakulat schrieb:
>>     
>>> On 17.05.07 13:01:05, Ralf Habacker wrote:
>>>   
>>>       
>>>> Andreas Pakulat schrieb:
>>>>     
>>>>         
>>>>> On Unix and KDE3 one could attach a gdb if you're fast enough. First you
>>>>> had to restart kded with an env var set then it would always produce the
>>>>> pid of the kioslave on stderr when a new kioslave is created. I guess
>>>>> this doesn't work on Windows.
>>>>>   
>>>>>       
>>>>>           
>>>> Which var is it ?
>>>>     
>>>>         
>>> See trunk/KDE/kdebase/runtime/kioslave/DEBUG.howto for information. I
>>> don't know wether that will work on win32.
>>>   
>>>       
>> Thanks for this pointer. The main trick for unix is done in kinit/kinit.cpp
>>
>>         fprintf(stderr, "kdeinit4: Suspending process\n"
>>                         "kdeinit4: 'gdb kdeinit4 %d' to debug\n"
>>                         "kdeinit4: 'kill -SIGCONT %d' to continue\n",
>>                         getpid(), getpid());
>>         kill(getpid(), SIGSTOP);
>>
>> The real question is how to suspend the process so that gdb or other 
>> debuggers can continue the attached process.
>>     
>
> After about 4 hours of kdebug-adding+recompiling I found that the
> hostname lookup for the pc name doesn't work which breaks the socket.
> Then I tried to track down this a bit and came into kdecore/network. So
> I looked at the log. I didn't see any comment that would point into the
> right direction so I just tried with a revert of everything up to May
> 10th. Unfortunately that didn't help yet... I have another build started
> right now and will look at the additional kdebug outputs tomorrow.
>
>   
I have added mingw debug support, which makes debugging much faster. The 
required steps are listed below:

1. Install mingw gdb  and add gdb dir to PATH

2. Set KDE_SLAVE_DEBUG_WAIT=<protocol>

where protocol is for example the term 'file'  for kio_file.

3. Then restart klauncher
4. run kioslavetest - after a short period gdb will be opened in a 
separate window attached to kioslave with loaded kio_file.dll
5. enter
b kdemain
c
and kioslave will be stopped in the function kdemain

Regards
 Ralf







> Andreas
>
>   




More information about the Kde-windows mailing list