diff options
author | Paul Koning <paul_koning@dell.com> | 2015-10-26 15:53:37 -0400 |
---|---|---|
committer | Paul Koning <paul_koning@dell.com> | 2015-10-26 15:53:37 -0400 |
commit | e0063bdcde2623cfb17c1f517f42c8924d463c2b (patch) | |
tree | f2573263724205f2fb8f7ccffc5a82d949affd92 /gdb/target.h | |
parent | 357d8270b141ee35d60fc6e01d0a17b9cd9b45fa (diff) | |
download | gdb-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.h | 4 |
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); |