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]

Re: Python Pretty printing a struct


>>>>> "Chris" == Chris Johns <chris@contemporary.net.au> writes:

Chris>     def to_string(self):
Chris>         return 'to_string'

This seems like a strange definition for this method.
Try removing it.

Chris> I have also noticed this:
Chris> (gdb) p /x the_semaphore->Object.id
Chris> $37 = 0x1a010012
Chris> Is it expected the actual value is shown in hex rather than the
Chris> numeric fields returned by the pretty print iterator ?

Tom> It might be a bug, I am not sure.

Chris> Should I raise a bug report ?

Sure.

Chris> I have also found:
Chris> (gdb) p (Object_Id) 0x1a010012
Chris> does not invoke the Object_Id pretty printer. In this RTEMS target
Chris> Object_Id is a typedef to uint32_t which is a typedef to "unsigned
Chris> long" so GDB looks for a the "unsigned long" pretty printer rather
Chris> that an Object_Id one.

This is probably due to http://sourceware.org/bugzilla/show_bug.cgi?id=10660

Tom


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