This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin1.dll startup and GDB




Chris Faylor wrote:
> 
> On Tue, Apr 27, 1999 at 10:30:48PM -0400, fortinj@ibm.net wrote:
> >DJ Delorie wrote:
> >>
> >> >       Either way, mapname will be NULL since NULL is being passed as the
> >> > first parameter to open_shared.
> >>
> >> Not always.  When NULL is passed, we musn't call OpenFileMapping(),
> >> because it doesn't fail gracefully when passed NULL.
> >>
> >
> >Sorry, I meant in the specific case I had described later where NULL
> >was passed.
> 
> Maybe we're agreeing here, but I just wanted to point out again that
> DJ's analysis of the situation was correct (not a surprise).  The
> problem was that OpenFileMapping should never be called when name ==
> NULL.  This was a bug that my recent change introduced.  Prior to my
> change, that segment of code never saw a name == NULL.  After my change,
> this segment of code was *validly* passed a NULL but it was not dealing
> with it the way I intended.
> 
> Anyway, that means that either his change or mine should rectify the
> problem.
> 
> I'm not sure why you are arguing the point rather than trying his
> suggestion.
> 
> cgf

Actually, I agree totally.  In my post I wasn't sure if I had made it
clear I was talking about a specific case, and DJ seemed to be
explaining the general case.  

Besides, asking a question, valid or not, usually increases the
knowledge of the person asking.  There are many different pieces to this
project, and I felt it was a reasonable question.  I  don't like to
blindly change code without at least a hazy understanding of what's
going on.

I made the changes you suggested in your other post, and gdb now works
as expected.


John Fortin