aboutsummaryrefslogtreecommitdiff
path: root/gdb/inferior.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r--gdb/inferior.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h
index b8d5ff9..66fc180 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -352,6 +352,13 @@ public:
void push_target (struct target_ops *t)
{ m_target_stack.push (t); }
+ /* An overload that deletes the target on failure. */
+ void push_target (target_ops_up &&t)
+ {
+ m_target_stack.push (t.get ());
+ t.release ();
+ }
+
/* Unpush T from this inferior's target stack. */
int unpush_target (struct target_ops *t)
{ return m_target_stack.unpush (t); }