[gdb, hurd] Repair build after "Convert struct target_ops to C++" changes
..., that is commit f6ac5f3d63
causing:
In file included from [...]/gdb/gnu-nat.c:24:0:
[...]/gdb/gnu-nat.h:123:1: error: expected class-name before '{' token
{
^
[...]/gdb/gnu-nat.h:128:16: error: 'inferior' has not been declared
void detach (inferior *, int) override;
^~~~~~~~
[...]/gdb/gnu-nat.h:132:8: error: use of enum 'target_xfer_status' without previous declaration
enum target_xfer_status xfer_partial (enum target_object object,
^~~~~~~~~~~~~~~~~~
[...]/gdb/gnu-nat.h:132:46: error: use of enum 'target_object' without previous declaration
enum target_xfer_status xfer_partial (enum target_object object,
^~~~~~~~~~~~~
[...]/gdb/gnu-nat.h:124:8: error: 'void gnu_nat_target::attach(const char*, int)' marked 'override', but does not override
void attach (const char *, int) override;
^~~~~~
[...]
[...]/gdb/gnu-nat.c: In member function 'virtual void gnu_nat_target::detach(inferior*, int)':
[...]/gdb/gnu-nat.c:2286:34: error: 'ops' was not declared in this scope
inf_child_maybe_unpush_target (ops);
^~~
[...]/gdb/gnu-nat.c:2286:34: note: suggested alternative: 'open'
inf_child_maybe_unpush_target (ops);
^~~
open
[...]/gdb/gnu-nat.c:2286:3: error: 'inf_child_maybe_unpush_target' was not declared in this scope
inf_child_maybe_unpush_target (ops);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]/gdb/gnu-nat.c:2286:3: note: suggested alternative: 'maybe_unpush_target'
inf_child_maybe_unpush_target (ops);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
maybe_unpush_target
[...]/gdb/i386-gnu-nat.c:200:1: warning: 'void gnu_store_registers(target_ops*, regcache*, int)' defined but not used [-Wunused-function]
gnu_store_registers (struct target_ops *ops,
^~~~~~~~~~~~~~~~~~~
[...]/gdb/i386-gnu-nat.c:109:1: warning: 'void gnu_fetch_registers(target_ops*, regcache*, int)' defined but not used [-Wunused-function]
gnu_fetch_registers (struct target_ops *ops,
^~~~~~~~~~~~~~~~~~~
[...]
/usr/bin/ld: i386-gnu-nat.o:(.data.rel+0x0): undefined reference to `vtable for i386_gnu_nat_target'
collect2: error: ld returned 1 exit status
gdb/
* 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'.
This commit is contained in:
parent
cabb5f067d
commit
2d0a338c7c
|
@ -1,5 +1,13 @@
|
|||
2019-02-14 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* 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.
|
||||
|
|
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ extern __typeof__ (mach_thread_info) mach_thread_info asm ("thread_info");
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "inf-child.h"
|
||||
|
||||
struct inf;
|
||||
|
||||
extern struct inf *gnu_current_inf;
|
||||
|
|
|
@ -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 ();
|
||||
|
|
Loading…
Reference in New Issue