This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/11482] Side effect of set print address on python API
- From: "michel dot metzger at st dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 19 May 2010 14:59:27 -0000
- Subject: [Bug python/11482] Side effect of set print address on python API
- References: <20100409172931.11482.michel.metzger@st.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From michel dot metzger at st dot com 2010-05-19 14:59 -------
Thanks for the patch. Unfortunately I'm afraid it does work in my case.
>From what I understood the hash is based on the python Value object address. So
two different Value instances representing the same address in the program being
debugged will have two different hashes. In my case this is a problem since the
hash map is initialized with global variable addresses as key and accessed with
a function parameter's value. Thus, I have two different Value object and two
different hash codes. I uploaded a new testcase showing this:
http://sourceware.org/bugzilla/attachment.cgi?id=4801
Maybe we could use the pointer value as a hash code for Value object
representing pointers?
Another solution (probably more complex though) would be to provide a method to
get the actual value of a Value object. I don't know if it makes sense...
--
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.