This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Wed, Mar 17, 2004 at 10:16:19AM -0500, Andrew Cagney wrote:
> >On Fri, Mar 05, 2004 at 12:31:46AM -0500, Andrew Cagney wrote:
> >
> >>>>>2004-02-28  Daniel Jacobowitz  <drow@mvista.com>
> >>>>>
> >>>>>	* remote.c (remote_open_1): Reopen the exec file and reread symbols
> >>>>>	if necessary.
> >>
> >>>
> >>>What happens if the target is "extended-remote"?
> >
> >
> >Works fine.  remote_open_1 is only called when we create the initial
> >connection and handles any rereading at that time; run_command in
> >infcmd.c will handle if the "run" command is issued over an existing
> >extended-remote connection.
> 
> Sorry, I ment without the patch (but I think you've answered that anyway).

Yeah - with extended-remote we don't reload on target extended-remote
but do reload on run.

> 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?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]