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

Daniel Jacobowitz
2004-03-23T16:47:58Z

On Tue, Mar 23, 2004 at 11:42:03AM -0500, Andrew Cagney wrote:
> 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

I don't think that's a good idea. For example, recently, I was running
/usr/bin/gdb. It got stuck in a loop. I attached, but could not get a
backtrace - it was stripped - so I detached, loaded
/nevyn/local/gdb/gdb-6.0/objdir/gdb/gdb, and attached. Then I had my
backtrace. Your proposed change above would have made GDB switch back
to the stripped version.

Sure, separate debug info is a nice solution to this - if you've
prepared it in advance.

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

OK, I'm checking it in for HEAD.

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

Absolutely agreed.