This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Need tips to open a socket and to debug it
- From: Glen L <ambirgris at yahoo dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sat, 16 Jan 2016 18:16:15 +0000 (UTC)
- Subject: Need tips to open a socket and to debug it
- Authentication-results: sourceware.org; auth=none
- References: <956984971 dot 4908269 dot 1452966941574 dot JavaMail dot yahoo dot ref at mail dot yahoo dot com> <956984971 dot 4908269 dot 1452966941574 dot JavaMail dot yahoo at mail dot yahoo dot com>
- Reply-to: Glen L <ambirgris at yahoo dot com>
Greetings all,
I'm moving a "C" program to 64-bit Windows 10 that worked previously in 32-bit Win7. It builds, compiles and runs (AFAIK) with the exception of being able to open a socket. Calling the socket thusly:
if ((g->listen = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) {
fprintf(stderr, "Can't create socket: %d %s", (int) errno, strerror(errno));
return -1;
}
The code is built for 64-bit windows using this:
x86_64-pc-cygwin-gcc -g --std=gnu99 -O0 -DGLUT_DISABLE_ATEXIT_HACK -nostdinc -march=core2 -m64
The result, however, is ENOENT and "No such file or directory."
uname -a : CYGWIN_NT-10.0 LAPTOP-B8KN061R 2.4.0(0.293/5/3) 2016-01-15 16:16 x86_64 Cygwin
I've tried a few things with the firewall and looked for internet tips. No luck, clearly.
So, I had the idea to step into the socket call and see what's going on. ENOENT seems a bit weird. I'm using Eclipse and gdb for this and it's working fine, with source, for the application. I can step around the machine code for the cygwin calls but no source. I've tried downloading the source files and debug info but I'm perplexed as to making that work. I don't seem to be finding the source files by hand that look like the machine code.
Can someone point me to a good reference on how to debug the distributed cygwin libraries? I would seem to be supported but I'm just not getting how to point to the sources and debug info from gdb.
Thanks for any and all support.
Glen
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple