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

Andrew Cagney
2004-03-22T22:28:52Z

>>> While "run" and "load" are fairly obvious sync points for GDB and its
>>> executable I'm not sure that "target remote" is - it's behavior is kind
>>> of sort of a screwed up version of attach.
>>>
>>> What does that do (as far as I can tell it doesn't re-read symbols)?
>
>
> I think you're right - attach won't reread symbols either. I believe
> run is the only current sync point. My instinct is that target remote
> and attach both ought to be - I know that if I'm debugging something
> that needs to be started in a separate environment and attached to, and
> I detach, rebuilt, re-attach, I'd be confused if GDB didn't
> auto-reload. I know I've tried to do the same thing for target remote,
> and expected GDB to reload - it didn't, and it took me a while to work
> out what the problem was.
>
> We should probably be consistent. Want me to get attach too?

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?

(meanwhile the remote change might as well go in to mainline)

Andrew