delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/04/21:12:11

X-Spam-Check-By: sourceware.org
Message-Id: <1136427122.29514.251115414@webmail.messagingengine.com>
From: "Brett Serkez" <techie AT serkez DOT net>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
References: <20060104125229 DOT GA3376 AT efn DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0601041426500 DOT 11072 AT slinky DOT cs DOT nyu DOT edu> <43BC2659 DOT 9060709 AT acm DOT org> <20060104203344 DOT GA18306 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT GSO DOT 4 DOT 63 DOT 0601041822460 DOT 1754 AT slinky DOT cs DOT nyu DOT edu> <1136421144 DOT 30911 DOT 251110210 AT webmail DOT messagingengine DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0601042045200 DOT 1754 AT slinky DOT cs DOT nyu DOT edu>
Subject: Re: services not starting with 20060104 snapshot
In-Reply-To: <Pine.GSO.4.63.0601042045200.1754@slinky.cs.nyu.edu>
Date: Wed, 04 Jan 2006 21:12:02 -0500
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> > 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019