aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-progspace.c')
-rw-r--r--gdb/python/py-progspace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 72a5d4f..f636ffd 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -28,6 +28,7 @@
#include "block.h"
#include "py-event.h"
#include "observable.h"
+#include "inferior.h"
struct pspace_object
{
@@ -69,11 +70,11 @@ struct pspace_deleter
this is one time when the current program space and current inferior
are not in sync: All inferiors that use PSPACE may no longer exist.
We don't need to do much here, and since "there is always an inferior"
- using target_gdbarch suffices.
+ using the current inferior's arch suffices.
Note: We cannot call get_current_arch because it may try to access
the target, which may involve accessing data in the pspace currently
being deleted. */
- struct gdbarch *arch = target_gdbarch ();
+ gdbarch *arch = current_inferior ()->arch ();
gdbpy_enter enter_py (arch);
gdbpy_ref<pspace_object> object (obj);