[PATCH] Implement debugging of WOW64 processes

Hannes Domani via gdb-patches gdb-patches@sourceware.org
Tue Mar 3 21:12:00 GMT 2020


 Am Dienstag, 3. März 2020, 22:01:00 MEZ hat Simon Marchi <simark@simark.ca> Folgendes geschrieben:

> On 2020-03-03 3:28 p.m., Eli Zaretskii wrote:
> >> Cc: gdb-patches@sourceware.org
> >> From: Simon Marchi <simark@simark.ca>
> >> Date: Tue, 3 Mar 2020 14:36:53 -0500
> >>
> >> Eli, just wondering, did you review the code parts of this patch?
> >
> > I've read it, yes.  I cannot say I know this area of Windows APIs well
> > enough to say something intelligent, though.  If the patch was tested
> > with 32-bit programs, I think it's OK.
>
> OK, thanks.  I've been looking at these Windows patches because nobody else
> was reviewing them.  I don't mind keeping doing that, but keep in mind that
> I don't know Windows nearly as much as you, so I really appreciate that you
> take a look.
>
> I looked at this patch quickly, it seems to add some code duplication and
> complexity, but that looks difficult to avoid without some serious refactoring
> (which would of course be nice, but not required for adding this feature).

I'm not very fond of the code duplication either.
The only way I can think of, is to refactor it into template functions that
can accept both CONTEXT or WOW64_CONTEXT.
Is this what you had in mind also, or do you have a better idea?


> The only bit I don't particularly like is the inclusion of i386-windows-nat.c
> in amd64-windows-nat.c, that just seems weird, and not very good in a long term
> maintenance perspective.
>
> Can you instead include the i386-windows-nat.c file in the cygwin64 and mingw64
> builds (in configure.nat), so that it gets compiled in a more standard fashion?

Yes, I can do that.
I didn't even know that configure.nat was the place for this, that's why I
did it with the include.


Regards
Hannes Domani



More information about the Gdb-patches mailing list