This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Call target_close after unpushing, not before (was: Re: [patch] Fix remote.c crash on gdbserver close (+fix py-finish-breakpoint.exp for gdbserver))
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>, Kevin Pouget <kevin dot pouget at gmail dot com>
- Date: Thu, 19 Jan 2012 17:23:49 +0100
- Subject: Re: Call target_close after unpushing, not before (was: Re: [patch] Fix remote.c crash on gdbserver close (+fix py-finish-breakpoint.exp for gdbserver))
- References: <m38vmni02o.fsf@fleche.redhat.com> <CAPftXUKwVk!haR7KsPmL2cVAFFsnww=vW3T3BvovK7wQWyFadZA@mail.gmail.com> <CAPftXUK+KT2d1K6gppNe87PWGKARROAZvvaWgpWXjx3RtiKdfg@mail.gmail.com> <CAPftXU+ck+RVjxBZba6YEQa+yOMj1sPrD=k21aKXzbWevH6epg@mail.gmail.com> <m34nwvges0.fsf@fleche.redhat.com> <CAPftXULL7yf6Wo57zt5uAWUJecvWHzVfsF_LSNa5Qub8=5Z6gw@mail.gmail.com> <20111225113745.GA16273@host2.jankratochvil.net> <20111227232323.GA6956@host2.jankratochvil.net> <4F020A20.2020801@gmail.com> <4F183E97.4010704@redhat.com>
On Thu, 19 Jan 2012 17:02:31 +0100, Pedro Alves wrote:
> Any comments on this?
I am fine with it with the comment update.
Thanks,
Jan
gdb/
2012-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
* target.h (target_close): Update comment on the target's unpush state.
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -820,10 +820,10 @@ extern struct target_ops current_target;
longer going to be calling. QUITTING indicates that GDB is exiting
and should not get hung on an error (otherwise it is important to
perform clean termination, even if it takes a while). This routine
- is automatically always called when popping the target off the
- target stack (to_beneath is undefined). Closing file descriptors
- and freeing all memory allocated memory are typical things it
- should do. */
+ is automatically always called after popping the target off the
+ target stack - the target's own methods are no longer available
+ through the target vector. Closing file descriptors and freeing all
+ memory allocated memory are typical things it should do. */
void target_close (struct target_ops *targ, int quitting);