From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16251 invoked by alias); 17 Nov 2005 11:28:55 -0000 Received: (qmail 16237 invoked by uid 22791); 17 Nov 2005 11:28:52 -0000 Received: from fra-del-03.spheriq.net (HELO fra-del-03.spheriq.net) (195.46.51.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 17 Nov 2005 11:28:52 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-03.spheriq.net with ESMTP id jAHBSnU7025697 for ; Thu, 17 Nov 2005 11:28:49 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-02.spheriq.net with ESMTP id jAHBSltR013243 for ; Thu, 17 Nov 2005 11:28:48 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id jAHBSkFn005908 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 17 Nov 2005 11:28:47 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 31533DA43; Thu, 17 Nov 2005 11:28:46 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 1EB0347471; Thu, 17 Nov 2005 11:31:45 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 62730759AE; Thu, 17 Nov 2005 11:31:44 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 432394744C; Thu, 17 Nov 2005 11:31:43 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CGZ44080 (AUTH "andrew stubbs"); Thu, 17 Nov 2005 11:28:42 GMT Message-ID: <437C68CF.3060805@st.com> Date: Thu, 17 Nov 2005 12:26:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] keep-variable command References: <437B44E1.8090008@st.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.1.07 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00272.txt.bz2 Eli Zaretskii wrote: > It's possible this is something I never knew about: is it actually > correct that _all_ convenience variables are deleted when `file' is > used? The explanation above about their types being lost doesn't make > sense to me; can you explain? For example, if I define a variable > that holds an integer number, why would its type become meaningless? Currently _all_ convenience variables are deleted when the symbol-file command is used. The file command also uses symbol-file. The explanation I gave refers to the situation after my patch has been applied and the debugger is attempting to keep some variables. You are correct when you say that basic types will always exist. However, I did not want to assume that they will be kept in the same place. Our initial implementation did not attempt to fix this up at all and worked for quite a while before anybody noticed it didn't work (badly) with unusual types. Investigation showed that it was only working with basic types by chance - the new types just happened to be at the same addresses, so I fixed it up properly as you see it now. There is always the possibility of a file redefining any type, of course, so you may not be using the int you thought you were using. > Does this description assume that convenience variables point, or are > somehow related, to the symbol table? If so, why does this assumption > hold for every convenience variable? I can think of a convenience > variable that has no relation whatsoever to the symbol table; how does > such a variable fit into the above scheme? All variables must have a type, even void ones, as far as I can tell. The type is recorded in terms of a reference into a table of types which is related to the symbol table in some way I do not claim to fully understand. What is certain is that symbol-file wipes the type table. Please give your example of a convenience variable with no relation to the symbol table. Andrew