This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: postgresql and sockets


On Thu, May 05, 2005 at 11:10:30PM +0200, Krzysztof Duleba wrote:
>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?

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

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

cgf

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]