delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/05/19:59:04

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: Fri, 6 May 2005 02:02:07 +0200
Lines: 103
Message-ID: <d5ebh4$9dv$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> <d5e1fc$buk$1 AT sea DOT gmane DOT org> <20050505231637 DOT GF15066 AT trixie DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
X-IsSubscribed: yes

Christopher Faylor wrote:

> This isn't really a "how do I debug the dll"  It's a "how do I debug".

That, too.

>   gdb psql.exe
>   dll cygwin1.dll
>   l get_inet_addr
>   bp <first line of getinet_addr>
>   run

Thanks. Assuming that bp should read break (undefined command otherwise)
gdb produced the following output:

Breakpoint 1, get_inet_addr (in=0x1001a918, inlen=110, out=0x22ec30,
    outlen=0x22ec68, type=0x22ec2c, secret=0x61811728)
    at
/netrel/src/cygwin-snapshot-20050503-1/winsup/cygwin/fhandler_socket.cc:5
3
53      {
Current language:  auto; currently c++
(gdb) n
get_inet_addr (in=0x690070, inlen=2097264, out=0x1, outlen=0x23f648,
    type=0x23f601, secret=0x23fbf8)
    at
/netrel/src/cygwin-snapshot-20050503-1/winsup/cygwin/fhandler_socket.cc:5
5
55        int* secret_ptr = (secret ? : secret_buf);
(gdb) n
53      {
(gdb) n
55        int* secret_ptr = (secret ? : secret_buf);
(gdb) n
53      {
(gdb) n
55        int* secret_ptr = (secret ? : secret_buf);
(gdb) n
57        if (in->sa_family == AF_INET)
(gdb) n
63        else if (in->sa_family == AF_LOCAL)
(gdb) n
190         check (src, opt | PC_NULLEMPTY, suffixes);
(gdb) n
189       {
(gdb) n
190         check (src, opt | PC_NULLEMPTY, suffixes);
(gdb) n
66            if (pc.error)
(gdb) n
152       bool exists () const {return fileattr !=
INVALID_FILE_ATTRIBUTES;}
(gdb) n
150       int issocket () const {return dev.devn == FH_UNIX;}
(gdb) n
78                set_errno (EBADF);
(gdb) n
79                return 0;
(gdb) n
119           return 0;
(gdb) n
121     }
(gdb) n
fhandler_socket::connect (this=0x61811580, name=0x1001a918, namelen=110)
    at
/netrel/src/cygwin-snapshot-20050503-1/winsup/cygwin/fhandler_socket.cc:7
47
747     }
(gdb) n
cygwin_connect (fd=3, name=0x1001a918, namelen=110)
    at /netrel/src/cygwin-snapshot-20050503-1/winsup/cygwin/net.cc:837
837           if (was_blocking)
(gdb) n
836           res = fh->connect (name, namelen);
(gdb) n
837           if (was_blocking)
(gdb) n
879       syscall_printf ("%d = connect (%d, %p, %d)", res, fd, name,
namelen);
(gdb) n
882     }
(gdb) n
0x6109555f in _sigbe ()
    at /netrel/src/cygwin-snapshot-20050503-1/winsup/cygwin/cygserver.h:82
82        ssize_t error_code () const { return _header.error_code; };
(gdb) n
0x67982daf in pq!PQconnectPoll () from /usr/bin/pq.dll
(gdb) n
Single stepping until exit from function pq!PQconnectPoll,
which has no line number information.
0x67993d10 in pqGethostbyname () from /usr/bin/pq.dll


...


Does it help at all? If I stepped the code with s instead of n, there were
quite a lot of function calls (esp. from path.cc) and the output became
huge. Should I send it anyway?

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