From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [pushed/ob] Apply "Convert observers to C++" edit to gdbarch.sh (Re: [PATCH] infrun: step through indirect branch thunks)
Date: Mon, 09 Apr 2018 14:42:00 -0000 [thread overview]
Message-ID: <944991b6-f949-4c3f-22d3-dffb2dd84e67@redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B2369669616@IRSMSX103.ger.corp.intel.com>
On 04/09/2018 03:19 PM, Metzger, Markus T wrote:
> While regenerating gdbarch, I noticed that it generated the following
> unrelated changes:
>
> --- gdbarch.c 2018-04-09 14:56:08.976814000 +0200
> +++ new-gdbarch.c 2018-04-09 14:57:33.914668000 +0200
> @@ -44,7 +44,7 @@
> #include "reggroups.h"
> #include "osabi.h"
> #include "gdb_obstack.h"
> -#include "observable.h"
> +#include "observer.h"
> #include "regcache.h"
> #include "objfiles.h"
> #include "auxv.h"
> @@ -5480,7 +5480,7 @@
> gdb_assert (new_gdbarch != NULL);
> gdb_assert (new_gdbarch->initialized_p);
> current_inferior ()->gdbarch = new_gdbarch;
> - gdb::observers::architecture_changed.notify (new_gdbarch);
> + observer_notify_architecture_changed (new_gdbarch);
> registers_changed ();
> }
>
> , which result in a build error:
>
> .../gdb/gdbarch.c:47:10: fatal error: observer.h: No such file or directory
> #include "observer.h"
> ^~~~~~~~~~~~
> compilation terminated.
>
> I excluded those from my patch.
We should just fix that first. Done now.
From 0bee6dd4aa42b928c2a7a496596490b694e5722b Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Mon, 9 Apr 2018 15:34:48 +0100
Subject: [PATCH] Apply "Convert observers to C++" edit to gdbarch.sh
Regenerating gdbarch.c results in:
--- gdbarch.c 2018-03-26 23:18:52.905548891 +0100
+++ new-gdbarch.c 2018-04-09 15:32:30.006712207 +0100
@@ -44,7 +44,7 @@
#include "reggroups.h"
#include "osabi.h"
#include "gdb_obstack.h"
-#include "observable.h"
+#include "observer.h"
#include "regcache.h"
#include "objfiles.h"
#include "auxv.h"
@@ -5457,7 +5457,7 @@
gdb_assert (new_gdbarch != NULL);
gdb_assert (new_gdbarch->initialized_p);
current_inferior ()->gdbarch = new_gdbarch;
- gdb::observers::architecture_changed.notify (new_gdbarch);
+ observer_notify_architecture_changed (new_gdbarch);
registers_changed ();
}
Clearly commit 76727919ceb5 ("Convert observers to C++") edited
gdbarch.c directly instead of gdbarch.sh. This fixes it.
gdb/ChangeLog:
2018-04-09 Pedro Alves <palves@redhat.com>
* gdbarch.sh: Include "observable.h" instead of "observer.h".
(set_target_gdbarch): Call
gdb::observers::architecture_changed.notify instead of
observer_notify_architecture_changed.
---
gdb/ChangeLog | 7 +++++++
gdb/gdbarch.sh | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fc95d7632fd..71e175fe993 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2018-04-09 Pedro Alves <palves@redhat.com>
+
+ * gdbarch.sh: Include "observable.h" instead of "observer.h".
+ (set_target_gdbarch): Call
+ gdb::observers::architecture_changed.notify instead of
+ observer_notify_architecture_changed.
+
2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
* tracepoint.c (struct current_traceframe_cleanup): Remove.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 33dfa6b349d..092302993a7 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1644,7 +1644,7 @@ cat <<EOF
#include "reggroups.h"
#include "osabi.h"
#include "gdb_obstack.h"
-#include "observer.h"
+#include "observable.h"
#include "regcache.h"
#include "objfiles.h"
#include "auxv.h"
@@ -2506,7 +2506,7 @@ set_target_gdbarch (struct gdbarch *new_gdbarch)
gdb_assert (new_gdbarch != NULL);
gdb_assert (new_gdbarch->initialized_p);
current_inferior ()->gdbarch = new_gdbarch;
- observer_notify_architecture_changed (new_gdbarch);
+ gdb::observers::architecture_changed.notify (new_gdbarch);
registers_changed ();
}
--
2.14.3
next prev parent reply other threads:[~2018-04-09 14:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 5:16 [PATCH] infrun: step through indirect branch thunks Markus Metzger
2018-03-26 17:38 ` Pedro Alves
2018-04-09 14:20 ` Metzger, Markus T
2018-04-09 14:42 ` Pedro Alves [this message]
2018-04-09 15:04 ` Pedro Alves
2018-04-09 16:24 ` Metzger, Markus T
2018-04-09 16:29 ` Pedro Alves
2018-04-10 9:02 ` Metzger, Markus T
2018-04-10 9:10 ` Pedro Alves
2018-04-13 14:58 ` Gary Benson
2018-04-13 16:07 ` Simon Marchi
2018-04-15 19:47 ` Simon Marchi
2018-04-16 6:51 ` Metzger, Markus T
2018-04-17 13:32 ` Gary Benson
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=944991b6-f949-4c3f-22d3-dffb2dd84e67@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).