This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Python Pretty printing a struct
- From: Chris Johns <chris at contemporary dot net dot au>
- To: gdb at sourceware dot org
- Date: Fri, 12 Mar 2010 10:39:20 +1100
- Subject: Python Pretty printing a struct
Hello,
I have progressed so I can take a "unsigned long" value which is bit
encoded and display it using the display hint 'struct' and a pretty
print iterator. For example:
(gdb) p the_semaphore->Object.id
$36 = to_string = {
id = 436273170,
node = 1,
api = classic,
class = semaphores,
index = 18
}
How do I remove the extra "to_string =" ?
I have also noticed this:
(gdb) p /x the_semaphore->Object.id
$37 = 0x1a010012
Is it expected the actual value is shown in hex rather than the numeric
fields returned by the pretty print iterator ?
Chris