This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve strace to log most Windows debug events


On Jun 10 16:18, Corinna Vinschen wrote:
> On Jun 10 16:11, Corinna Vinschen wrote:
> > Hi Jon,
> > 
> > On Jun 10 13:05, Jon TURNEY wrote:
> > > Not sure if this is wanted, but on a couple of occasions recently I have been
> > > presented with strace output which contains an exception at an address in an
> > > unknown module (i.e. not in the cygwin DLL or the main executable), so here is a
> > > patch which adds some more information, including DLL load addresses, to help
> > > interpret such straces.
> > 
> > That's a nice addition.  Two points, though:
> > 
> > - Do we *always* want that output or do we want a way to switch it on
> >   and off?  If the latter, we can simply add another _STRACE_foo option
> >   for it.  
> > 
> > - The GetFileNameFromHandle function could be much simpler.  Rather than
> >   opening a mapping object for ev.u.LoadDll.hFile, just use the existing
> >   mapping object from ev.u.LoadDll.lpBaseOfDll.
> 
>     ...with the process handle taken from get_child(ev.dwProcessId).

And since I'm generally fuzzy and unclear in my first reply:

Of course, ev.u.LoadDll.lpBaseOfDll is not the mapping *object*, but the
mapping *address*.  So you neither have to call CreateFileMapping nor
MapViewOfFile.  Just call GetMappedFileNameW (get_child (ev.dwProcessId),
ev.u.LoadDll.lpBaseOfDll, ...)


Sorry,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgptYcsMb7Q5o.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]