Debugging 3.0.23d Winbindd

Gerald (Jerry) Carter jerry at samba.org
Wed Feb 7 10:08:39 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dhruva wrote:
> On 2/7/07, Gerald (Jerry) Carter <jerry at samba.org> wrote:
>> IIRC.  Other than than, the best trick I found is just to
>> attach to the correct winbindd.  Of course, you have to
>> figure that out.  The "debug pid" & "debug timestamp" options
>> are helpful here for the log files.
>>
>> And I find inserting sleep() calls in the code in order to
>> give me time to attach is helpful.
>>
> 
> Though I have not tried this personally on UNIXes: IMO, you can add a
> small piece of code in winbind to spawn a debugger and attach to
> itself. May be, you could use smbrun (for the spawning part) for that.
> We use something similar on VMS. The same thing is doable on Windows
> using call to 'int 3' which attaches the process to a registered JIT
> (Just in time) debugger.

Another trick is setting the "panic action" to spawn gdb
in an xterm or calling sleep and then sprinkling the code
with smb_panic() calls.  Of course, this makes it impossible
to continue but does help if you think that something
shouldn't be happening in the first place.







cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFyaUnIR7qMdg1EfYRAp5mAKCspwNObBNZEA7oZ2dTTXvJBzWx4wCbBpgE
QqBeFOU9v8BPeN8pLja6K1I=
=d0so
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list