This project aims to make it possible for users to connect to multiple targets at once. For example, a user could connect to multiple gdbservers at the same time; or freely mix native, remote, and core-file debugging.
Parameterize global state for corelow.c (this is done on the branch)
- ... and ideally, likewise for all the targets. However, this is hard, particularly for sim. I expect to do just the subset commonly used by distro users. (Partly done: remote and core are handled; but I think ctf, tfile, and perhaps record are not)
Get rid of target_ops::beneath. This lets us reuse a target_ops in multiple target stacks.
Make the target stack be reference counted; and attach it to the program space.
Give the user a way to request a new target. Currently I have add-inferior -new-target, but it isn't clear this is the best way.
The branch also has a big patch to split target_ops into state and vtable components. This isn't strictly needed but it makes gdb cleaner.
Fix up the target dcache to be per-target-stack. (Fixed by Yao's patch which will go into master.)
- Change gdb to handle the same PID coming from multiple targets. The basic change to ptid is done here, more may be required.
- Need to iterate across targets in various cases: stop processes on all targets when one stops (in all-stop); resuming; maybe C-c handling; quit
The frame cache should probably be per-target (though see PR7573 -- perhaps the it should be per-address space instead).
Maybe this requires a fix for PR7251, making it possible for target commands to be interrupted. At the very least it seems like a nice-to-have. We possibly want to allow the "&" suffix for target commands to make them connect asynchronously.
Also see PR15712 - making target-async enabled by default. Async is needed for multi-target to work nicely.
- Write tests and documentation