From: Glen L <ambirgris@yahoo.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Need tips to open a socket and to debug it
Date: Sat, 16 Jan 2016 20:00:00 -0000 [thread overview]
Message-ID: <1645435954.1234364.1452968175143.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <956984971.4908269.1452966941574.JavaMail.yahoo@mail.yahoo.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
next parent reply other threads:[~2016-01-16 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <956984971.4908269.1452966941574.JavaMail.yahoo.ref@mail.yahoo.com>
[not found] ` <956984971.4908269.1452966941574.JavaMail.yahoo@mail.yahoo.com>
2016-01-16 20:00 ` Glen L [this message]
2016-01-18 18:10 ` Corinna Vinschen
2016-01-18 19:50 ` Henri
2016-01-18 21:06 ` Corinna Vinschen
2016-01-19 13:39 ` Henri
2016-01-19 13:51 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1645435954.1234364.1452968175143.JavaMail.yahoo@mail.yahoo.com \
--to=ambirgris@yahoo.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).