aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorPaul Koning <paul_koning@dell.com>2015-10-26 15:53:37 -0400
committerPaul Koning <paul_koning@dell.com>2015-10-26 15:53:37 -0400
commite0063bdcde2623cfb17c1f517f42c8924d463c2b (patch)
treef2573263724205f2fb8f7ccffc5a82d949affd92 /gdb/target.h
parent357d8270b141ee35d60fc6e01d0a17b9cd9b45fa (diff)
downloadgdb-e0063bdcde2623cfb17c1f517f42c8924d463c2b.zip
gdb-e0063bdcde2623cfb17c1f517f42c8924d463c2b.tar.gz
gdb-e0063bdcde2623cfb17c1f517f42c8924d463c2b.tar.bz2
fix exec_close to be multi-target-aware
This changes exec_close so it doesn't close inferiors from other targets. 2014-07-29 Tom Tromey <tromey@redhat.com> * target.h (target_stack_decref_cleanup): Declare. * exec.c (exec_xclose_1): Skip program spaces from other targets. * target.c (target_stack_decref_cleanup): New function.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 78610bf..13865a2 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1265,6 +1265,10 @@ extern struct target_stack *target_stack_incref (void);
extern void target_stack_decref (struct target_stack *);
+/* A wrapper for target_stack_decref suitable for use as a cleanup. */
+
+extern void target_stack_decref_cleanup (void *arg);
+
/* Set target_stack and current_target from TSTACK. */
extern void target_stack_set_current (struct target_stack *tstack);