[PATCH v3] Implement debugging of WOW64 processes

Simon Marchi simark@simark.ca
Wed Mar 4 20:45:00 GMT 2020


On 2020-03-04 3:18 p.m., Hannes Domani via gdb-patches wrote:
> I tested watchpoints with WOW64 processes as well, didn't have any problems.

I was expecting some problems in some corner cases.  For example, see function
x86_handle_nonaligned_watchpoint.

If you make it believe that one watchpoint register can watch up to 8 bytes, when
in reality they can watch just 4, then I can imagine that we could be placing an
8 bytes watchpoint, but miss a change somewhere in the last four bytes, something
like that.

However, according to the Intel Architecture Manual [1], section "17.2.6 Debug
Registers and Intel 64 Processors", it says "Break point conditions for 8-byte memory
read/writes are supported in all modes."  So I presume that even when debugging a
32 bit process, 8-byte watchpoints will be supported, and that won't be a problem.

Simon

[1] https://software.intel.com/en-us/articles/intel-sdm



More information about the Gdb-patches mailing list