Files
haiku-beta6/headers/posix
PulkoMandy 11adda21aa Expose more info in signal handler mcontext
Add the following:

- CS and SS registers
- For 32bit: DS, ES, FS, GS registers (on 64 bit these are not part of
  the iframe structure)
- CR2 register (fault address)
- Hardware interrupt number
- Hardware error code

The hardware error code, interrupt number and fault address are not
modifiable by the signal handlers. The other registers can be modified.

This is used for example in dosemu to intercept errors from JIT generated
code and resume execution. Wine can also make use of it.

In order to not change the size of struct mcontext, these are inserted
in a region of the FXSAVE structure that is available for the OS to
store some data (as documented by Intel) and that we didn't use before.

Fixes #7867

Change-Id: Ia3c27a2c728e32995196c646c1d78adf40e793ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9456
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-19 18:00:39 +00:00
..
2020-07-03 15:30:00 -04:00
2025-07-11 06:56:43 +00:00
2023-12-30 18:09:57 +00:00
2021-06-19 18:09:25 +00:00
2024-12-17 09:45:13 +00:00
2022-02-18 21:27:06 +00:00
2025-03-13 19:30:39 -04:00
2025-07-07 15:20:18 +00:00