On Thursday 13 November 2008 02:19:57 Pedro Alves wrote: > On Wednesday 12 November 2008 20:39:02, Vladimir Prus wrote: > > This patch makes CLI 'detach' and MI '-target-detach' accept the PID > > of the process to detach from. > > I see several issues with this patch: > > - The target is not the right layer to do this. Before you reach here, > you've already done things to the current inferior. E.g., > target.c:target_detach will call remove_breakpoints before reaching > remote_detach_1. This means that, if you have e.g., selected inferior 1, > and do detach 3, you'll remove breakpoints from inferior 1, and detach > process 3. Breakpoints are an example. Other example is that before you > reach the process stratum, you can pass by the thread_stratum, which again > would do anything to the wrong detachee, since it's usually the > process_statum that does the final real detach. That's bad. How about the attached -- where mostly everything is done on MI side? - Volodya