This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: rfc: Add a target argument to to_disconnect
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 5 May 2006 16:09:32 -0400
- Subject: Re: rfc: Add a target argument to to_disconnect
- References: <20060410182623.GA30104@nevyn.them.org>
On Mon, Apr 10, 2006 at 02:26:23PM -0400, Daniel Jacobowitz wrote:
> This patch moves to_disconnect to be more similar to to_xfer_partial:
>
> - It takes the target_ops as an argument.
> - Instead of squashing into current_target, we search the
> target vector at call time for the right implementation.
>
> I believe there was a general consensus that this form was better than the
> previous defaulted form. And it makes set debug target work better, too.
> If no one objects, I may go through and add target arguments to more of
> the existing methods.
>
> My main motivation for doing this is to reduce the duplication in remote.c;
> we have lots of little wrapper routines to figure out "is this a remote or
> extended-remote target?" because we can't get from where we are back to
> the target vector we were called through.
>
> Any opinions?
There weren't any...
I've committed the patch for target_disconnect. I may go through and
do more such mechanical conversions, at least as I encounter methods
where they'd be useful, but I'm not going to do it today!
--
Daniel Jacobowitz
CodeSourcery