Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Python Pretty printing a struct
@ 2010-03-11 23:39 Chris Johns
  2010-03-12 20:40 ` Tom Tromey
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Johns @ 2010-03-11 23:39 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-16  5:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 23:39 Python Pretty printing a struct Chris Johns
2010-03-12 20:40 ` Tom Tromey
2010-03-14 23:40   ` Chris Johns
2010-03-15 16:39     ` Tom Tromey
2010-03-15 22:52       ` Chris Johns
2010-03-16  2:18         ` Tom Tromey
2010-03-16  5:10           ` Chris Johns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox