From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10164 invoked by alias); 12 Apr 2002 00:54:26 -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 10083 invoked from network); 12 Apr 2002 00:54:24 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 12 Apr 2002 00:54:24 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA24419; Thu, 11 Apr 2002 17:54:23 -0700 (PDT) Message-ID: <3CB62D73.D338FB58@redhat.com> Date: Thu, 11 Apr 2002 17:54:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Per Bothner , gdb-patches@sources.redhat.com Subject: Re: PATH: reset innermost_block on 'run' References: <3CB62486.1030104@bothner.com> <3CB62C4C.A58FDBE2@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00438.txt.bz2 Michael Snyder wrote: > > Per Bothner wrote: > > > > It's been a while since I made this change, but as I recall > > without it gdb will tend to crash when you re-start the > > inferior using a 'run' command. > > > > Now I don't know exactly the best place to reset the > > innermost_block variable, but it *is* a cache variable > > that must be reset whenever execution continues, including > > on each 'run'. > > Eeeewww! I believe you're right! ;-( > Thanks for the catch, but I don't believe run_command is the right spot. > If we want to do it whenever execution resumes, then how about putting > it in resume()? Moreover, there are two global extern declarations for this variable: one in parser-defs.h, and one in expression.h. Which one should we eliminate? I think that everything that includes parser-defs.h also includes expression.h (or should), but not vice versa, so maybe keep it in expression.h? > > > > > * infcmd.c (run_command): Reset innermost_block. > > -- > > --Per Bothner > > per@bothner.com http://www.bothner.com/per/ > > > > ------------------------------------------------------------------------ > > Index: infcmd.c > > =================================================================== > > RCS file: /cvs/src/src/gdb/infcmd.c,v > > retrieving revision 1.43 > > diff -u -p -r1.43 infcmd.c > > --- infcmd.c 28 Mar 2002 01:35:55 -0000 1.43 > > +++ infcmd.c 11 Apr 2002 23:57:47 -0000 > > @@ -387,6 +387,8 @@ Start it from the beginning? ")) > > init_wait_for_inferior (); > > } > > > > + innermost_block = NULL; > > + > > clear_breakpoint_hit_counts (); > > > > /* Purge old solib objfiles. */