From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19562 invoked by alias); 8 Mar 2005 13:48:35 -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 19334 invoked from network); 8 Mar 2005 13:48:20 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 8 Mar 2005 13:48:20 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1D8f4D-00025Q-57; Tue, 08 Mar 2005 08:48:09 -0500 Date: Tue, 08 Mar 2005 13:48:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] re-read symbols before "start"-ing... Message-ID: <20050308134809.GE7417@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20050308064529.GB18053@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308064529.GB18053@adacore.com> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00123.txt.bz2 On Mon, Mar 07, 2005 at 10:45:29PM -0800, Joel Brobecker wrote: > What happens here is that we insert the breakpoint *before* the > notification is received. So we end up using the cached value > for the main procedure name, which is out of date. The answer > is to make sure the symbols are re-read if the executable has > changed. > > Bad point for me, sorry... Fortunatly, only Ada is affected for now. > Attached is a patch. > > 2005-03-07 Joel Brobecker > > * infcmd.c (start_command): Make sure the symbols are up to date > before setting the temporary breakpoint. > > Tested on x86-linux. This fixes the FAIL above. Otherwise, the results > are identical. > > OK to commit? Just my two cents, but I think you may want to add an argument to run_command, instead, and create the breakpoint there. For instance there's probably a case where you'll need reopen_exec_file (). And reread_symbols is passably expensive - lots of stat(). -- Daniel Jacobowitz CodeSourcery, LLC