delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/30/11:06:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 30 May 2001 11:06:26 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: UNIX-socket problems under cygwin 1.3.2 -addon
Message-ID: <20010530110626.A18495@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20010530095638 DOT D17603 AT redhat DOT com> <004501c0e915$a4826d50$6e032bb7 AT BRAMSCHE>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <004501c0e915$a4826d50$6e032bb7@BRAMSCHE>; from Ralf.Habacker@saght.tessag.com on Wed, May 30, 2001 at 04:34:32PM +0200

On Wed, May 30, 2001 at 04:34:32PM +0200, Ralf Habacker wrote:
>>
>> Sure, some additional information in this case would be the lines of
>> code in question.  There is no need to speculate on the behavior of
>> strace when you have the ability to read the source code.
>
>Reading the code and understanding it is not the same. My main task is to
>port kde and I don't have very deep knowledge about the socket stuff in
>cygwin. I have looked in cygwin and strace, but it's heavy. :-)
>
>One question: How are you debbuging dll's ?

Deja vu.

>Second Question: How do you debug an error in cygwin1.dll which will only be
>existant, when !strace && !debbuging ?

Again, gdb.

Rather than approaching this from the direction of "Woe is me, Cygwin is
too big to be understandable", you could think of it as "Hey, neat!  I've
got the source code so I can step *right into* the DLL and see what is
happening!"

I just had the astonishing occurrence yesterday of talking to someone who
had just built cygwin by grabbing the sources and doing a configure/build.

I was really incredulous.  I said "But, you didn't ask for my help!" He
said, "Why did I need your help?  It just built." I said, "Didn't you
first try to build it in the same directory as the source?" and he said
"No, the documentation says not to do that."

"How did you know to run configure?"

"Well, it's a standard GNU program, isn't it?  Besides the FAQ tells you how
to build it."

"But, but what are you going to do now?"

"Oh, I thought it would be interesting to look into the socket code and
see why select is so slow."

"Do you want me to tell you where to find select?"

"Isn't it in the select.cc file?"

"Um, yeah.  I guess.  Let me explain how to debug it..."

"Doesn't gdb work?  It seemed to work for me."

"Yes, gdb works, but..."

"Cygwin is a shared library, right?  So, I have to put a breakpoint at
main before I look at anything in cygwin because it is loaded at runtime,
either that or..."

"Aha!  But you can use the 'dll' command that I implemented in gdb to
preload the cygwin DLL.  You'll have to type..."

"Ah, thanks.  I was just using add-symbol-file.  I assume that the dll
command just lets you type 'dll cygwin1' or something like that?"

"Um, yeah."

"So, this really isn't that hard."

"No.  I guess not."

"Ok.  I'm going to debug select now.  I assume that I should send a
patch somewhere, if I find something?"

"Yes.  Check out the Contributing..."

"...link on the Cygwin web page?  That's right.  I skimmed that already."

"Ok.  Good luck.  If you need any more...  Er, good luck."

"Thanks."

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019