This is the mail archive of the gdb@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]

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


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