From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1515 invoked by alias); 28 Feb 2004 17:39:56 -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 1508 invoked from network); 28 Feb 2004 17:39:56 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Feb 2004 17:39:56 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ax8RP-00049n-Vd for ; Sat, 28 Feb 2004 12:39:55 -0500 Date: Sat, 28 Feb 2004 17:39:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [rfa/remote] Reread symbols on 'target remote' Message-ID: <20040228173955.GA15910@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00834.txt.bz2 Right now chng-syms.exp fails for remote targets, because "run" causes the executable to be reread but "target remote" doesn't. I thought I'd already submitted a patch for this, a year or two ago, but I can't find it in my archives anywhere. This patch just adds a matching check to remote_open_1. This patch, and another I'm about to send separately, fix chng-syms.exp for gdbserver targets. OK? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2004-02-28 Daniel Jacobowitz * remote.c (remote_open_1): Reopen the exec file and reread symbols if necessary. Index: gdb/remote.c =================================================================== RCS file: /big/fsf/rsync/src-cvs/src/gdb/remote.c,v retrieving revision 1.129 diff -u -p -r1.129 remote.c --- gdb/remote.c 15 Feb 2004 15:22:06 -0000 1.129 +++ gdb/remote.c 27 Feb 2004 22:36:05 -0000 @@ -2146,6 +2146,9 @@ remote_open_1 (char *name, int from_tty, if (!async_p) wait_forever_enabled_p = 1; + reopen_exec_file (); + reread_symbols (); + target_preopen (from_tty); unpush_target (target);