From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5086 invoked by alias); 17 Mar 2004 16:51:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4956 invoked from network); 17 Mar 2004 16:51:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 17 Mar 2004 16:51:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B3eGC-0002DW-FZ; Wed, 17 Mar 2004 11:51:16 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/remote] Reread symbols on 'target remote' Message-ID: <20040317165115.GA8390@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20040228173955.GA15910@nevyn.them.org> <404810C2.8050005@gnu.org> <20040306235436.GA10071@nevyn.them.org> <40586BC3.1080706@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40586BC3.1080706@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00388.txt.bz2 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 > >>>>> > >>>>> * 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5086 invoked by alias); 17 Mar 2004 16:51:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4956 invoked from network); 17 Mar 2004 16:51:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 17 Mar 2004 16:51:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B3eGC-0002DW-FZ; Wed, 17 Mar 2004 11:51:16 -0500 Date: Wed, 17 Mar 2004 16:51:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa/remote] Reread symbols on 'target remote' Message-ID: <20040317165115.GA8390@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20040228173955.GA15910@nevyn.them.org> <404810C2.8050005@gnu.org> <20040306235436.GA10071@nevyn.them.org> <40586BC3.1080706@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40586BC3.1080706@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00388.txt Message-ID: <20040317165100.mYS3swX6DEpEW7rRc0Sc0EoagYBoKf-MZstw8xR_MoY@z> 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 > >>>>> > >>>>> * 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