This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging
On Aug 12, 12:19pm, Andrew Cagney wrote:
> > At the moment, I like the first approach better because it's simpler.
> > I'd prefer that we wait on the more complicated approach until a need
> > is demonstrated for the additional complexity.
> >
> >
> >> Adding a local/remote test is going to be easier.
> >
> >
> > Do we already have such a test?
>
> Well, looking at some finally dead hacks, ....
>
> int
> remote_Z_write_wp_packet_supported_p (void)
> {
> struct remote_state *rs = get_remote_state ();
> /* Don't even think about it if the remote target isn't selected. */
> /* FIXME: cagney/2002-05-19: This shouldn't be necessary - the
> WATCHPOINT methods should be in the target vector. Ulgh! */
> if (target_shortname == NULL
> || strcmp (target_shortname, "remote") != 0)
> return 0;
>
> notice that the problem it was trying to avoid was with ``target sim''.
> So in the above the question is no longer local/remote but local VS
> remote VS sim VS ....
Actually, I think it's probably better to recast the question in terms
of native vs. non-native targets. For native targets, I think it's
appropriate for solib_open() to examine the host environment
variables. (Though there are still cases where even this is wrong.)
For non-native targets, I think the user should be required to have
settings for solib-absolute-prefix and solib-search-path. (Though
as Daniel pointed out, there are cases when it would be okay to use
the host's environment variables.)
Kevin