This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: services not starting with 20060104 snapshot
> > Try using a graphical debugger like ddd or insight. Should be able
> > to start either as the service,
>
> Huh? No, that doesn't work. I need a service wrapper program (like
> cygrunsrv), but cygrunsrv can't spawn processes, apparently.
I see. While I've not used this method with services per se, I've used
it with other background processes, didn't foresee the service_main.
You should be able attach to the running service process with gdb, from
the
manual:
You can, instead, specify a process ID as a second argument, if you
want to debug a running process:
gdb(1,4) program 1234
The trick is where will the program be when you attach. To resolve
this, code *like* the following can be inserted just prior to the
point you want to start debugging:
{
int a = 1;
while ( a ) ;
}
When you gain control you will be in the while, assign a value of 0
to a and then start stepping thru the remaining code.
Brett
----------------------------------------------------------------
Brett C. Serkez, Techie
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/