Apply "Convert observers to C++" edit to gdbarch.sh
authorPedro Alves <palves@redhat.com>
Mon, 9 Apr 2018 14:34:48 +0000 (15:34 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 9 Apr 2018 14:34:48 +0000 (15:34 +0100)
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
gdb/gdbarch.sh

index fc95d7632fd7bd264375f43f48b0ef6aa46161e3..71e175fe993fd99a6f411df07574c6dbd38f7b35 100644 (file)
@@ -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.
index 33dfa6b349dee778f1a82a511a6cf57960d48f89..092302993a7cbc3e4dec3b43d07fbe3a8db5adfd 100755 (executable)
@@ -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 ();
 }