Re: [rfa/remote] Reread symbols on 'target remote'

Andrew Cagney
2004-03-23T16:42:06Z

>>Well attach is more messed up than that. It might load the symbol table
>>> (if it isn't already loaded and can be determined from /proc). Should
>>> attach instead always load the symbol table, prefering what is provided
>>> by the executable?
>
>
> If I'm reading you right - then I think the answer is yes. What's your
> opinion on the patch below? If there is no exec file, then attempt to
> determine one from target_pid_to_exec_file. Otherwise, attempt to
> reread the exec file.

I was thinking of something more agressive:

if target (via /proc) can identify exec file
switch to target's exec file, load
else if exec file known
load
else
hope the user knows what they are doing
fi

which is different to the current logic like:

if exec file known
do nothing
else if target (via /proc) can identify exec file
switch to target's exec file, load
else
hope ...
fi

however yes, at least (per your patch) always loading the symbols is a
good first step.

(this goes back to earlier posts where we need to overaul the target
stack so that multiple instances are available)

Andrew