From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24850 invoked by alias); 24 Jan 2007 22:07:36 -0000 Received: (qmail 24767 invoked by uid 22791); 24 Jan 2007 22:07:34 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 24 Jan 2007 22:07:29 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H9qGx-0008Lt-3F; Wed, 24 Jan 2007 17:07:15 -0500 Date: Wed, 24 Jan 2007 22:07:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Denis PILAT , Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [RFC] varobj deletion after the binary has changed Message-ID: <20070124220715.GA31476@nevyn.them.org> Mail-Followup-To: Nick Roberts , Denis PILAT , Vladimir Prus , gdb-patches@sources.redhat.com References: <45B60056.6030704@st.com> <20070123124457.GA1600@nevyn.them.org> <45B61B41.90509@st.com> <17847.54349.654238.452957@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17847.54349.654238.452957@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00511.txt.bz2 On Thu, Jan 25, 2007 at 10:49:01AM +1300, Nick Roberts wrote: > The crash occurs because computing TYPE_CODE (type) involves a memory > violation. This comes from "type = SYMBOL_TYPE (var)" in read_var_value, in > turn from var = exp->elts[pc + 2].symbol which is from exp = var->root->exp of > the variable object in question (if that makes sense!). Right, that's about what I expected. A parsed exp has pointers into the symbol table, which at this point has been flushed and reloaded. For expressions not associated with a particular block, we ought to reparse them from the original string if the symbol file changes. I'm not sure what to do for things involving local variables; we need to discard valid_block too, for the same reason. Breakpoints have similar issues, which are handled in breakpoint.c, but they don't usually carry block pointers around. The other things which could be invalidated when we reload the file are the type pointers in values. So, we probably need to discard all values when reloading the file. -- Daniel Jacobowitz CodeSourcery