Add a new 'info proc files' subcommand of 'info proc'.
[deliverable/binutils-gdb.git] / gdb / python / py-finishbreakpoint.c
index 7a05ad3195a2587eb4c0585c84b680ecb308eafe..c33b7dd7aa64a127d4f4aba5787f2b67a98784b3 100644 (file)
@@ -26,7 +26,7 @@
 #include "gdbthread.h"
 #include "arch-utils.h"
 #include "language.h"
-#include "observer.h"
+#include "observable.h"
 #include "inferior.h"
 #include "block.h"
 #include "location.h"
@@ -221,14 +221,15 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
   if (PyErr_Occurred ())
     return -1;
 
-  thread = ptid_to_global_thread_id (inferior_ptid);
-  if (thread == 0)
+  if (inferior_ptid == null_ptid)
     {
       PyErr_SetString (PyExc_ValueError,
                        _("No thread currently selected."));
       return -1;
     }
 
+  thread = inferior_thread ()->global_num;
+
   if (internal)
     {
       internal_bp = PyObject_IsTrue (internal);
@@ -416,8 +417,8 @@ gdbpy_initialize_finishbreakpoints (void)
                              (PyObject *) &finish_breakpoint_object_type) < 0)
     return -1;
 
-  observer_attach_normal_stop (bpfinishpy_handle_stop);
-  observer_attach_inferior_exit (bpfinishpy_handle_exit);
+  gdb::observers::normal_stop.attach (bpfinishpy_handle_stop);
+  gdb::observers::inferior_exit.attach (bpfinishpy_handle_exit);
 
   return 0;
 }
This page took 0.02576 seconds and 4 git commands to generate.