Differences between revisions 2 and 3
Revision 2 as of 2013-07-01 13:11:04
Size: 1632
Editor: TomTromey
Comment: link to bugs
Revision 3 as of 2013-07-01 18:59:09
Size: 1764
Editor: TomTromey
Comment: link to PR 15712
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
 * Also see Sourceware:PR15712 - making {{{target-async}}} enabled by default. Async is needed for multi-target to work nicely.

Multiple Targets

This page describes the multi-target project, aka PR7250. This is in the ProjectArcher repository, on the tromey/multi-target branch.


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.


  • Move remote.c global state into struct remote_state. This is largely done and submitted.

  • Likewise for corelow.c

  • ... 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.
  • 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.

  • Change gdb to handle the same PID coming from multiple targets
  • 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
  • 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.

  • Also see PR15712 - making target-async enabled by default. Async is needed for multi-target to work nicely.


None: MultiTarget (last edited 2015-07-23 19:42:56 by PaulKoning)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.