diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c88216b94b..fcaae6125e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2019-02-14 Thomas Schwinge + * gnu-nat.c (gnu_nat_target::detach): Instead of + 'inf_child_maybe_unpush_target (ops)' call 'maybe_unpush_target'. + * gnu-nat.h: #include "inf-child.h". + * i386-gnu-nat.c (gnu_fetch_registers): Rename/move to + 'i386_gnu_nat_target::fetch_registers'. + (gnu_store_registers): Rename/move to + 'i386_gnu_nat_target::store_registers'. + * config/i386/nm-i386gnu.h: Don't "#include" any files. * gnu-nat.h (mach_thread_info): New function. * gnu-nat.c (thread_takeover_sc_cmd): Use it. diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index bd8fcb6e59..78966c805d 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2280,7 +2280,7 @@ gnu_nat_target::detach (inferior *inf, int from_tty) inferior_ptid = null_ptid; detach_inferior (pid); - inf_child_maybe_unpush_target (ops); + maybe_unpush_target (); } diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h index dbad0cac93..4bd4176ead 100644 --- a/gdb/gnu-nat.h +++ b/gdb/gnu-nat.h @@ -35,6 +35,8 @@ extern __typeof__ (mach_thread_info) mach_thread_info asm ("thread_info"); #include +#include "inf-child.h" + struct inf; extern struct inf *gnu_current_inf; diff --git a/gdb/i386-gnu-nat.c b/gdb/i386-gnu-nat.c index c23c4bc79c..75ae641f8e 100644 --- a/gdb/i386-gnu-nat.c +++ b/gdb/i386-gnu-nat.c @@ -105,9 +105,8 @@ fetch_fpregs (struct regcache *regcache, struct proc *thread) } /* Fetch register REGNO, or all regs if REGNO is -1. */ -static void -gnu_fetch_registers (struct target_ops *ops, - struct regcache *regcache, int regno) +void +i386_gnu_nat_target::fetch_registers (struct regcache *regcache, int regno) { struct proc *thread; ptid_t ptid = regcache->ptid (); @@ -196,9 +195,8 @@ store_fpregs (const struct regcache *regcache, struct proc *thread, int regno) } /* Store at least register REGNO, or all regs if REGNO == -1. */ -static void -gnu_store_registers (struct target_ops *ops, - struct regcache *regcache, int regno) +void +i386_gnu_nat_target::store_registers (struct regcache *regcache, int regno) { struct proc *thread; struct gdbarch *gdbarch = regcache->arch ();