How does one debug smbd?
mimir at spin.ict.pwr.wroc.pl
Thu Jul 19 11:49:24 GMT 2001
On Wed, 18 Jul 2001, eric steadle wrote:
> I'd like run smbd in a debugger (gdb is fine)
> interactively, but when I do so, I get tripped up by
> the following line of code in server.c:
> if (!is_daemon && !is_a_socket(0))
> The debug message below this line leads me to believe
> that standard input is not a socket, but not being a
> daemon wizard, that doesn't mean much to me. What is
> this line of code doing, exactly?
You mean you don't understand what this particular line does
or you are asking about something more complicated ?
> More to the point, how do I get smbd not to fork, and
> to run in my debugger so I can trace some things.
I guess, you may let him fork insted of modifying him not to do this. You
may then try to attach to forked process.
I did it in this way once, when I needed to debug program that forked into
2 or 3 processes.
Rafal 'Mimir' Szczesniak <mimir at spin.ict.pwr.wroc.pl> |
*BSD, Linux and Samba /
More information about the samba-technical