[PATCH] Improve strace to log most Windows debug events
Wed Jun 10 15:44:00 GMT 2015
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),
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin-patches