Re: [RFA] Remove unnecessary target defaults.

Vladimir Prus
2008-08-15T14:41:46Z

On Friday 15 August 2008 18:30:59 Pedro Alves wrote:
> On Friday 15 August 2008 15:15:59, Vladimir Prus wrote:
>
> > The problem you raise is real, however. I think one approach to solve it
> > is to just make remote-sim define to_can_async_p. More generic solution
> > would be to arrange so that if we have a target on process stratum, it
> > never goes to targets below for to_can_async_p. For example, if we have
> >
> > - exec
> > - dummy
> >
> > and you do run, then target_can_async_p will look at exec, then at dummy,
> > then find_default_can_async_p will return some results. But if we have
> >
> >
> > - remote-sim
> > - exec
> > - dummy
> >
> > then target_can_async_p will either invoke a method in remote-sim (if
> > present), or return 0.
> >
> > How does this sound?
>
> It sounds sound to me. This would be like a generalised version of
> inf-child.c, from which all targets that can have execution
> inherit.

Well, actually, I meant implementing target_can_async_p in such a way that it:

- iterates over all targets
- breaks after it examines a target at process stratum

Of course, we can also have a common target, but it would require manually adjusting
all target on process stratum.

- Volodya