On 16.04.2020 22:07, Tom Tromey wrote: >>>>>> ">" == Kamil Rytarowski writes: > >>> All major BSDs implement PT_GET_PROCESS_STATE, but they differ in >>> details and want to implement follow-fork functionality differently. > Actually I was wrong in this detail. FreeBSD implements PT_SET_EVENT_MASK, but not PT_GET_PROCESS_STATE. >>> gdb/ChangeLog: > >>> * inf-ptrace.h (follow_fork, insert_fork_catchpoint) >>> (remove_fork_catchpoint, post_startup_inferior) >>> (post_attach): Move... > > I guess these aren't used on Linux, but what about rs6000-nat.c? Those > are the only non-BSD users of inf_ptrace_target that I can see. > > I'm not a big fan of the current code, because makes methods conditional > on this define. It would be better I guess to have an intermediate > subclass for this situation. That would make it clear what code does or > does not rely on this. > Personally, I would like to see more separation of OS specific features into OS-private files. > You don't have to do that, but I don't think we can put this in without > knowing about the rs6000-nat case. > > Tom > IBM RS/6000 is AIX and it does not support PT_GET_PROCESS_STATE. At least not in the versions I could check. There was however support for PT_GET_PROCESS_STATE in HPUX, but HPUX handling was removed from GDB in 2015.