9 Jul
2022
9 Jul
'22
2:25 p.m.
On Sat Jul 9 06:52:04 2022 +0000, Jinoh Kang wrote:
I noticed that we already rely on `TRAP_SIG(ucontext)` to determine the correct exception in `segv_handler`. If we can trust `TRAP_SIG(ucontext)` over `siginfo->si_code` for `SIGTRAP` too in all platforms, perhaps it makes sense to make this switch unconditional. I haven't done it this way because I was unsure of what happens in case of single step and hardware breakpoint on the same instruction. I turns out it doesn't need special handling in x86_64 case. I've also done some testing with icebp instruction, after changing the code it no longer needs special handling. I will push changed version.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/408#note_3819