]> Git Repo - binutils.git/blobdiff - gdb/python/py-progspace.c
2011-10-27 Phil Muldoon <[email protected]>
[binutils.git] / gdb / python / py-progspace.c
index 2c8a677b7090c4cc966232d76f072048dad996f0..c30b37d20f3d4b37e4d2f49d4d5396a179a6bc95 100644 (file)
@@ -1,6 +1,6 @@
 /* Python interface to program spaces.
 
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 #include "progspace.h"
 #include "objfiles.h"
 #include "language.h"
+#include "arch-utils.h"
 
 typedef struct
 {
@@ -134,9 +135,7 @@ py_free_pspace (struct program_space *pspace, void *datum)
 {
   struct cleanup *cleanup;
   pspace_object *object = datum;
-  /* FIXME: What's the right way to get a program space's arch?
-     There may be multiple.  */
-  struct gdbarch *arch = get_objfile_arch (pspace->symfile_object_file);
+  struct gdbarch *arch = get_current_arch ();
 
   cleanup = ensure_python_env (arch, current_language);
   object->pspace = NULL;
@@ -186,7 +185,8 @@ gdbpy_initialize_pspace (void)
     return;
 
   Py_INCREF (&pspace_object_type);
-  PyModule_AddObject (gdb_module, "Progspace", (PyObject *) &pspace_object_type);
+  PyModule_AddObject (gdb_module, "Progspace",
+                     (PyObject *) &pspace_object_type);
 }
 
 \f
This page took 0.026679 seconds and 4 git commands to generate.