From: Thomas Schwinge <thomas@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Pedro Alves <palves@redhat.com>
Subject: Re: [RESEND][PATCH 01/40] Convert struct target_ops to C++
Date: Thu, 14 Feb 2019 15:30:00 -0000 [thread overview]
Message-ID: <87r2caie0n.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <bc79f25b-0233-eff1-8ff7-22cfa1b06303@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]
Hi!
On Thu, 3 May 2018 01:05:55 +0100, Pedro Alves <palves@redhat.com> wrote:
> >From f6ac5f3d63e03a81c4ff3749aba234961cc9090e Mon Sep 17 00:00:00 2001
> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 3 May 2018 00:37:22 +0100
> Subject: [PATCH] Convert struct target_ops to C++
Pushed to master the attached commit
2d0a338c7c321de6c63be4e7e3f06ba12b783c63 '[gdb, hurd] Repair build after
"Convert struct target_ops to C++" changes'.
Grüße
Thomas
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gdb-hurd-Repair-build-after-Convert-struct-target_op.patch --]
[-- Type: text/x-diff, Size: 5515 bytes --]
From 2d0a338c7c321de6c63be4e7e3f06ba12b783c63 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 20 Jul 2018 02:03:25 +0200
Subject: [PATCH] [gdb, hurd] Repair build after "Convert struct target_ops to
C++" changes
..., that is commit f6ac5f3d63e03a81c4ff3749aba234961cc9090e 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'.
---
gdb/ChangeLog | 8 ++++++++
gdb/gnu-nat.c | 2 +-
gdb/gnu-nat.h | 2 ++
gdb/i386-gnu-nat.c | 10 ++++------
4 files changed, 15 insertions(+), 7 deletions(-)
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 <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.
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 ();
}
\f
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 <unistd.h>
+#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 ();
--
2.19.2
next prev parent reply other threads:[~2019-02-14 15:30 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 19:09 [PATCH 00/40] C++ify target_ops, toward multi-target Pedro Alves
2018-04-14 19:10 ` [PATCH 32/40] target_ops/C++: Generic i386/AMD64 BSD targets Pedro Alves
2018-04-14 19:10 ` [PATCH 29/40] target_ops/C++: Tile-Gx GNU/Linux Pedro Alves
2018-04-14 19:10 ` [PATCH 38/40] target_ops: Use bool throughout Pedro Alves
2018-04-14 19:10 ` [PATCH 20/40] target_ops/C++: ARM GNU/Linux Pedro Alves
2018-04-14 19:10 ` [PATCH 40/40] target factories, target open and multiple instances of targets Pedro Alves
2018-04-14 19:10 ` [PATCH 34/40] target_ops/C++: bsd_kvm_add_target, BSD libkvm target Pedro Alves
2018-04-14 19:10 ` [PATCH 03/40] target_ops/C++: exec target Pedro Alves
2018-04-14 19:10 ` [PATCH 08/40] target_ops/C++: bsd-uthread Pedro Alves
2018-04-14 19:10 ` [PATCH 27/40] target_ops/C++: SPARC GNU/Linux Pedro Alves
2018-04-14 19:10 ` [PATCH 39/40] linux_nat_target: More low methods Pedro Alves
2018-04-18 0:40 ` John Baldwin
2018-04-14 19:10 ` [PATCH 37/40] target_ops/C++: The Hurd Pedro Alves
2018-04-14 19:10 ` [PATCH 17/40] target_ops/C++: macOS/Darwin target Pedro Alves
2018-04-14 19:10 ` [PATCH 23/40] target_ops/C++: IA-64 GNU/Linux Pedro Alves
2018-04-14 19:10 ` [PATCH 19/40] target_ops/C++: AIX target Pedro Alves
2018-04-14 19:10 ` [PATCH 07/40] target_ops/C++: ravenscar-thread Pedro Alves
2018-04-14 19:10 ` [PATCH 09/40] target_ops/C++: bfd-target Pedro Alves
2018-04-14 19:10 ` [PATCH 02/40] make-target-delegates: line break between return type and function name Pedro Alves
2018-04-14 19:15 ` [PATCH 12/40] target_ops/C++: target remote-sim Pedro Alves
2018-04-14 19:15 ` [PATCH 22/40] target_ops/C++: HP-PA GNU/Linux Pedro Alves
2018-04-14 19:15 ` [PATCH 14/40] target_ops/C++: PPC/PPC64 GNU/Linux Pedro Alves
2018-04-14 19:18 ` [PATCH 36/40] target_ops/C++: go32/DJGPP Pedro Alves
2018-04-14 19:18 ` [PATCH 25/40] target_ops/C++: m68k GNU/Linux Pedro Alves
2018-04-14 19:18 ` [PATCH 04/40] target_ops/C++: core target Pedro Alves
2018-04-14 19:18 ` [PATCH 24/40] target_ops/C++: m32r GNU/Linux Pedro Alves
2018-04-14 19:19 ` [PATCH 15/40] target_ops/C++: Solaris/procfs Pedro Alves
2018-04-14 19:19 ` [PATCH 05/40] target_ops/C++: ctf/tfile targets Pedro Alves
2018-04-14 19:19 ` [PATCH 31/40] target_ops/C++: Base FreeBSD target Pedro Alves
2018-04-17 16:12 ` John Baldwin
2018-04-17 17:07 ` Pedro Alves
2018-04-17 17:28 ` Kamil Rytarowski
2018-04-17 18:13 ` Pedro Alves
2018-04-17 18:50 ` Kamil Rytarowski
2018-04-18 0:40 ` John Baldwin
2018-04-18 1:51 ` Kamil Rytarowski
2018-04-18 11:23 ` Pedro Alves
[not found] ` <0b900391-f06d-278c-cbed-b89b207bd12e@redhat.com>
2018-04-18 14:20 ` Pedro Alves
2018-04-18 20:55 ` John Baldwin
2018-04-14 19:19 ` [PATCH 26/40] target_ops/C++: s390 GNU/Linux Pedro Alves
2018-04-14 19:19 ` [PATCH 30/40] target_ops/C++: Xtensa GNU/Linux Pedro Alves
2018-04-14 19:19 ` [PATCH 16/40] target_ops/C++: Windows targets Pedro Alves
2018-04-14 19:19 ` [PATCH 35/40] target_ops/C++: NTO/QNX, nto-procfs.c Pedro Alves
2018-04-14 19:20 ` [PATCH 11/40] target_ops/C++: remote/extended-remote targets Pedro Alves
2018-04-14 19:20 ` [PATCH 10/40] target_ops/C++: record targets Pedro Alves
2018-04-14 19:20 ` [PATCH 33/40] target_ops/C++: The rest of the BSD targets Pedro Alves
2018-04-14 19:20 ` [PATCH 06/40] target_ops/C++: spu-multiarch Pedro Alves
2018-04-14 19:28 ` [PATCH 21/40] target_ops/C++: Aarch64 GNU/Linux Pedro Alves
2018-04-14 19:28 ` [PATCH 28/40] target_ops/C++: SPU/Linux Pedro Alves
2018-05-04 17:09 ` Ulrich Weigand
2018-05-04 17:15 ` Pedro Alves
2018-05-04 17:22 ` Ulrich Weigand
2018-05-04 17:27 ` Pedro Alves
2018-04-14 19:29 ` [PATCH 13/40] target_ops/C++: GNU/Linux + x86/AMD64 Pedro Alves
2018-04-14 19:30 ` [PATCH 18/40] target_ops/C++: linux_trad_target, MIPS and Alpha GNU/Linux Pedro Alves
2018-04-16 15:15 ` [RESEND][PATCH 01/40] Convert struct target_ops to C++ Pedro Alves
2018-05-03 0:06 ` Pedro Alves
2018-10-27 21:58 ` 8.2 regression for invalid -data-directory [Re: [RESEND][PATCH 01/40] Convert struct target_ops to C++] Jan Kratochvil
2018-10-30 20:24 ` Tom Tromey
2019-02-14 15:30 ` Thomas Schwinge [this message]
2018-04-27 15:47 ` [PATCH 00/40] C++ify target_ops, toward multi-target Tom Tromey
2018-05-02 22:55 ` Pedro Alves
2018-04-29 15:22 ` Simon Marchi
2018-05-02 22:51 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r2caie0n.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox