diff options
author | Pedro Alves <palves@redhat.com> | 2014-05-21 22:28:23 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-05-21 22:28:23 +0100 |
commit | c1ee2fb3cb80ce3a7082002797712d5ffce33e21 (patch) | |
tree | 02f7c0ed9166c1a88c84dbb0f3b439ad6a54b7ae /gdb/inf-child.h | |
parent | ff604a674771e63dfc711b83093237ec7d5945dc (diff) | |
download | gdb-c1ee2fb3cb80ce3a7082002797712d5ffce33e21.zip gdb-c1ee2fb3cb80ce3a7082002797712d5ffce33e21.tar.gz gdb-c1ee2fb3cb80ce3a7082002797712d5ffce33e21.tar.bz2 |
Native targets: Add inf-child.c:inf_child_mourn_inferior and use it.
Most ports do the same thing in the tail of their mourn routine - call
generic_mourn_inferior+inf_child_maybe_unpush_target.
This factors that out to a convenience function. More could be done,
but this converts only the really obvious ones.
Tested by building GDB on x86_64 Fedora 20, mingw32 and djgpp. The
rest is untested, but I think a patch can't get more obvious.
gdb/
2014-05-21 Pedro Alves <palves@redhat.com>
* inf-child.c (inf_child_mourn_inferior): New function.
* inf-child.h (inf_child_mourn_inferior): New declaration.
* darwin-nat.c (darwin_mourn_inferior): Use
inf_child_mourn_inferior.
* gnu-nat.c (gnu_mourn_inferior): Likewise.
* inf-ptrace.c (inf_ptrace_mourn_inferior): Likewise.
* inf-ttrace.c (inf_ttrace_mourn_inferior): Likewise.
* nto-procfs.c (procfs_mourn_inferior): Likewise.
* windows-nat.c (windows_mourn_inferior): Likewise.
Diffstat (limited to 'gdb/inf-child.h')
-rw-r--r-- | gdb/inf-child.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/inf-child.h b/gdb/inf-child.h index 3f00ab6..b2692ca 100644 --- a/gdb/inf-child.h +++ b/gdb/inf-child.h @@ -36,6 +36,10 @@ extern void store_waitstatus (struct target_waitstatus *, int); extern void inf_child_open_target (struct target_ops *target, char *arg, int from_tty); +/* To be called by the native target's to_mourn_inferior routine. */ + +extern void inf_child_mourn_inferior (struct target_ops *ops); + /* Unpush the target if it wasn't explicitly open with "target native" and there are no live inferiors left. Note: if calling this as a result of a mourn or detach, the current inferior shall already |