This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rfc: Add a target argument to to_disconnect


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]