From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19270 invoked by alias); 19 May 2010 23:01:05 -0000 Received: (qmail 19191 invoked by uid 48); 19 May 2010 23:01:04 -0000 Date: Wed, 19 May 2010 23:01:00 -0000 Message-ID: <20100519230104.19190.qmail@sourceware.org> From: "tromey at redhat dot com" To: gdb-prs@sourceware.org In-Reply-To: <20100409172931.11482.michel.metzger@st.com> References: <20100409172931.11482.michel.metzger@st.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug python/11482] Side effect of set print address on python API X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00288.txt.bz2 ------- Additional Comments From tromey at redhat dot com 2010-05-19 23:01 ------- (In reply to comment #22) > Thanks for the patch. Unfortunately I'm afraid it does work in my case. > Maybe we could use the pointer value as a hash code for Value object > representing pointers? Many values have mutable contents. So we can't really hash on the contents. We could hash on the address, but not all values have addresses, and, bizarrely, I think you can have values with the same address but different contents (if they were read from inferior memory at different times). This is why we ended up going with identity hashing. I realize this is not ideal. In many cases the above considerations do not apply. However, it seems to me that in a specialized case you could pretty easily write a hashable facade that has whatever hash and equality methods you like. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11482 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.