aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/target.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b93a1dd..e75eb04 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-05-07 Simon Marchi <simon.marchi@efficios.com>
+ * target.c (target_stack::unpush): Call target_ops::find_beneath
+ to get the target beneath `t`.
+
+2021-05-07 Simon Marchi <simon.marchi@efficios.com>
+
* target.c (target_close): Check in all inferiors that the
target is not pushed.
diff --git a/gdb/target.c b/gdb/target.c
index 00f0acd..78327a2 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1214,7 +1214,7 @@ target_stack::unpush (target_ops *t)
m_stack[stratum] = NULL;
if (m_top == stratum)
- m_top = t->beneath ()->stratum ();
+ m_top = this->find_beneath (t)->stratum ();
/* Finally close the target, if there are no inferiors
referencing this target still. Note we do this after unchaining,