Re: [rfc v2][0/6] Remote /proc file access

Ulrich Weigand
2012-01-17T19:37:04Z

Pedro Alves wrote:
> On 01/16/2012 05:28 PM, Ulrich Weigand wrote:
> > Maybe. On the other hand, once we've switched to the gdbarch based
> > implementation, it would automatically work when not yet debugging
> > a process anyway, so I'm not sure this is really necessary ...
>
> Hmm. I though the target_file_xxx routines would all fail, hitting the default
> when no target implement the methods that way. IOW, I was thinking that we'd
> need to pass the struct target_ops pointer down to the gdbarch callback so
> the callback could work with the correct target.

I'd really prefer the gdbarch callback to stand alone; longer term I think
we ought to get rid of target_info_proc completely and have it just always
use the gdbarch callback.

However, you're right that the target_fileio_ routines fail. I've now fixed
this by making those fall back to the native target if we're not yet connected
to any actual target (>= process_stratum), just like it is already done for
target_get_osdata ...

Bye,