Mail Archives: cygwin/2001/05/30/11:06:44
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 -