postgresql and sockets

Krzysztof Duleba krzysan@skrzynka.pl
Thu May 5 23:58:00 GMT 2005


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/



More information about the Cygwin mailing list