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-04-15 14:35 -------
I perfectly understand how set print address works and what it's used for.
Let me explain with more details what I'm trying to achieve. Maybe I'm doing
this completely wrong.

I'm developing new commands to ease the debugging of applications developed
using component-oriented programming. I want to write a command that will print,
using the value of the "this" pointer, the actual name of the instance. 

To do that I have a table, in python, of all instances (more or less like OOP
instances), indexed with their location in memory. Since gdb.Value is not
hashable, so there is no way to use it directly as a key. So the solution I
implemented was to use the string representing the address as a key in my hashtable.

As you can see, I'm not trying to print any address, just use them internally in
the command implementation.

I hope this will makes things clearer.

-- 


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]