Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 4 Apr 2005 12:28:36 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: problem debugging application that calls getservbyname() Message-ID: <20050404102836.GQ1471@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4250CF30 DOT BA19646B AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4250CF30.BA19646B@dessent.net> User-Agent: Mutt/1.4.2i On Apr 3 22:22, Brian Dessent wrote: > #include > #include > > int main(char **argv, int argc) > { > struct servent *p; > > if((p = getservbyname("smtp", "tcp"))) { > printf("success\n"); > } else { > printf("failure\n"); > } > } > > Simple enough, no? > > $ ./getservbyname > success > > However, when I try to run this with gdb, the call to getservbyname() > dies somewhere in the autoloading code of Cygwin: > > $ gdb --quiet getservbyname > (gdb) br main > Breakpoint 1 at 0x40107e: file getservbyname.c, line 8. > (gdb) run > Starting program: /tmp/getservbyname.exe > > Breakpoint 1, main (argv=0x1, argc=168109856) at getservbyname.c:8 > 8 if((p = getservbyname("smtp", "tcp"))) { > (gdb) n > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x7801b8a8 in RpcRaiseException () from /winxp/system32/rpcrt4.dll > (gdb) c > Continuing. Hmm, http://cygwin.com/acronyms/#WJFFM Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/