/* 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.
#include "progspace.h"
#include "objfiles.h"
#include "language.h"
+#include "arch-utils.h"
typedef struct
{
{
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;
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