- On macOS, add error reporting when getting/setting debug registers. - Also, as in ptrace.c, use context->machine to determine which context struct to read/write. - And when setting, ensure that the correct debug state flavor is used (needed for Wow64)
The debug register tests should now pass on Mojave and Monterey, for 32- and 64-bit.
Note that Rosetta 2 on Apple Silicon mostly doesn't emulate debug registers, and the tests fail there.