Subject: using gdb w/ imapd & xinetd

From: Erik Damian Weathers <[email-masked]>
Date: Thu, 10 Jun 2004 15:48:05 -0700

----------------------------------
resending 'cause I never saw this appear in my inbox and I am not
sure if it was really delivered to the mailing list.
----------------------------------

hi all.

I need to use gdb w/ to debug problems I'm having setting up 
imapd in a "non-standard way" (is the "standard way" documented
somewhere?).
However, I'm a total newbie at using gdb w/ xinetd based socket
programs.  I figure there must be some simple, straight forward
way of using gdb in this scenario.  
(And apparently undocumented -- extensive searches of google and 
the c-client archive yielded jack.)
After all, there are tons of developers working on network
programs that run under xinetd; how is debugging done if not
thru gdb?

I've tried to attach gdb to an already running imapd process
execv'ed by xinetd, but get errors like this:
    Couldn't get registers: Operation not permitted.
    ptrace: Operation not permitted.
My assumption is that the imapd process is sorta zombied at this 
point and not fully operational, but really I have no clue.

I am aware that you can run gdb on imapd w/o going thru xinetd and 
manually enter the imap cmds, e.g.,
    gdb imapd/imapd
    run
    ...
    a002 select "INBOX"
But I'd like to be able to run my standard imap client (firebird)
and use gdb on the instance of imapd that firebird connects to.

any help is appreciated.

thanks,

- Erik
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------