This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: remove pop_target
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 25 Jul 2013 08:31:01 -0600
- Subject: Re: RFC: remove pop_target
- References: <1372793737-29192-1-git-send-email-tromey at redhat dot com> <51D3E89F dot 4040103 at redhat dot com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> PR remote/15256, PR remote/15266:
>> * bfd-target.c (target_bfd_reopen): Initialize to_magic.
>> * monitor.c (monitor_detach): Use unpush_target.
>> * remote-m32r-sdi.c (m32r_detach): Use unpush_target.
>> * remote-mips.c (mips_detach): Use unpush_target. Don't
>> call mips_close.
>> * remote-sim.c (gdbsim_detach): Use unpush_target.
>> * target.c (pop_target): Remove.
>> (pop_all_targets_above): Don't call target_close.
>> (target_close): Assert that the target is unpushed.
>> * target.h (pop_target): Don't declare.
>> * tracepoint.c (tfile_open): Use unpush_target.
Pedro> This looks good to me.
Thanks, I'm checking it in now.
>> --- a/gdb/monitor.c
>> +++ b/gdb/monitor.c
>> @@ -877,7 +877,7 @@ monitor_close (void)
>> static void
>> monitor_detach (struct target_ops *ops, char *args, int from_tty)
>> {
>> - pop_target (); /* calls monitor_close to do the real work. */
>> + unpush_target (ops);
Pedro> Nit, but you've preserved the similar comment in the other hunks.
I've restored the comment.
I'm not reposting the patch since this is a trivial change.
Tom