target_ops/C++: GNU/Linux + x86/AMD64
This converts the x86/AMD64 GNU/Linux ports to C++ified target_ops.
- inf-child/"native" is converted to an actual base class
(inf_child_target), that is inherited by the linux-nat target.
inf_child_target will be inherited by all other native targets too,
of course, in the following patches.
- The old weird double-target linux_ops mechanism in linux-nat.c, is
gone, replaced by adding a few virtual methods to linux-nat.h's
target_ops, called low_XXX, that the concrete linux-nat
implementations override. Sort of like gdbserver's
linux_target_ops, but simpler, for requiring only one
target_ops-like hierarchy, which spares implementing the same method
twice when we need to forward the method to a low implementation.
The low target simply reimplements the target_ops method directly in
that case.
There are a few remaining linux-nat.c hooks that would be better
converted to low_ methods like above too. E.g.:
linux_nat_set_new_thread (t, x86_linux_new_thread);
linux_nat_set_new_fork (t, x86_linux_new_fork);
linux_nat_set_forget_process
That'll be done in a follow up patch.
- We can no longer use functions like x86_use_watchpoints to install
custom methods on an arbitrary base target. The patch replaces that
with a template mixin. See x86_nat_target in x86-nat.h. That will
be used by other non-Linux x86 targets in following patches.
- linux-thread-db is converted here too.