This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] baby step toward multi-target
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jul 2014 17:16:24 +0100
- Subject: Re: [PATCH 0/4] baby step toward multi-target
- Authentication-results: sourceware.org; auth=none
- References: <1405711635-1102-1-git-send-email-tromey at redhat dot com> <53D7AE46 dot 8080303 at redhat dot com> <87lhrccja2 dot fsf at fleche dot redhat dot com>
On 07/29/2014 03:49 PM, Tom Tromey wrote:
> However, it's probably useful as a starting point for the next attempt
> at multi-target. In particular it's much less invasive than the earlier
> approach, and the "convert current_target to be a pointer" patch (the
> biggest one) was mostly done with a perl one-liner.
Yeah.
Hmm, kind of orthogonal, but not really, I wonder how far are we
to getting rid of the remaining target stack annoyances. Like:
#1 - Convert the remaining data fields to methods. That seems it'll
just be boring work.
#2 - making the debug target a wrapping target around each target layer
(as you suggested elsewhere). That'll require make-target-delegates
hacking.
That'd then make it possible to:
#3 - eliminate the squashed current_target, replacing it with a pointer
to the topmost target in the stack (mostly the same as your
perl one-liner).
Is that in line with what you've been thinking? I'm wondering whether
you found out in the more invasive branch that it's useful if
current_target is more than a struct target_ops pointer ?
(or "struct target *" after vtable-ification.)
Thanks,
Pedro Alves