delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/05/17:09:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
From: "Krzysztof Duleba" <krzysan AT skrzynka DOT pl>
Subject: Re: postgresql and sockets
Date: Thu, 5 May 2005 23:10:30 +0200
Lines: 50
Message-ID: <d5e1fc$buk$1@sea.gmane.org>
References: <d56cbd$jjd$1 AT sea DOT gmane DOT org> <20050503091333 DOT GF25050 AT calimero DOT vinschen DOT de> <d57meb$8ei$1 AT sea DOT gmane DOT org> <20050503131339 DOT GA27360 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
X-IsSubscribed: yes

Corinna Vinschen wrote:

> Are you set up to debug the DLL using GDB?  If you download the latest
> snapshot from http://cygwin.com/snapshots and set a breakpoint to
> get_inet_addr, you could step through this function until it's left.
> The first interesting information would be, from which line the function
> is left.
>
> If you're not setup to debug the DLL, I'd try to come up with some
> additional debug output for the next Cygwin snapshot.

Finally I had some time to try out the snapshot. There is no difference,
even strace output looks exactly the same.

How do I debug the DLL with gdb? I've tried doing it this way:

$ cd /bin; gdb
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin".
(gdb) dll-symbols cygwin1.dll
(gdb) break get_inet_addr
Cannot access memory at address 0x61046bf0
(gdb) file cygwin1.dll
Load new symbol table from "/usr/bin/cygwin1.dll"? (y or n) y
Reading symbols from /usr/bin/cygwin1.dll...done.
(gdb) break get_inet_addr

Breakpoint 1 at 0x61046bff: file
/netrel/src/cygwin-snapshot-20050503-1/winsup/c
ygwin/fhandler_socket.cc, line 55.


Now I guess I should exec psql, but I couldn't find a way to run it so
that it stops on the breakpoint.

The question "how do I debug the dll" is quite basic, but I haven't found
anything about it in the FAQ. The answer is probably in the archives, but
searching for gdb + cygwin1.dll gives way too many results. Any hints?

Regards
Krzysztof Duleba



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