On 19.03.2020 14:22, Simon Marchi wrote: > On 2020-03-19 8:47 a.m., Kamil Rytarowski wrote: >> This is a good idea.. however it is intrusive now and requires patching >> code shared with windows, linux, darwin, ... >> >> I prefer to leave it for refactoring in future. I don't have environment >> to test other Operating Systems than NetBSD. > > Hmm no, the callers of x86bsd_dr_set are only in this file (x86bsd_dr_set_control and > x86bsd_dr_set_addr). They would now look like this: > > static void > x86bsd_dr_set_control (unsigned long control) > { > x86bsd_dr_set (inferior_ptid, 7, control); > } > > static void > x86bsd_dr_set_addr (int regnum, CORE_ADDR addr) > { > gdb_assert (regnum >= 0 && regnum <= 4); > > x86bsd_dr_set (inferior_ptid, regnum, addr); > } > > Adding a ptid parameter to x86bsd_dr_set_control and x86bsd_dr_set_addr would be the > next logical step, but that indeed would be a more intrusive change, so I don't suggest > doing that right now. > Done in v4. > Simon >