This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/11482] Side effect of set print address on python API


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]