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: "pmuldoon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 14 Apr 2010 20:21:40 -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 pmuldoon at redhat dot com 2010-04-14 20:21 -------
Oops I made a small error, so a correction. It's not the Python API that is
enforcing whether they abide by the rules, it is the GDB code itself. In
valprint a call is made to the language specific print code:
09 ret = language->la_val_print (type, valaddr, embedded_offset, address,
(top-gdb) s
c_val_print (type=0xcdc3e0, valaddr=0xd01900 "\370\341\377\377\377\177",
embedded_offset=0, address=140737488347376, stream=0xcdcc20, recurse=0,
options=0x7fffffffd4f0) at ../../src/gdb/c-valprint.c:155
Which has a conditional:
276 if (options->addressprint)
277 fputs_filtered (paddress (gdbarch, addr), stream);
If addressprint is set to 0, as set by "set print address off" nothing will be
printed here and the function will return. So even though the Python value
contains the address, it will not be printed by GDB (regardless of whatever
Python tricks we could try)
--
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.