This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Reading a static variable in Python
- From: Tom Tromey <tromey at redhat dot com>
- To: Chris Johns <chris at contemporary dot net dot au>
- Cc: gdb at sourceware dot org
- Date: Wed, 10 Mar 2010 10:05:03 -0700
- Subject: Re: Reading a static variable in Python
- References: <4B971421.8080006@contemporary.net.au>
- Reply-to: tromey at redhat dot com
>>>>> "Chris" == Chris Johns <chris@contemporary.net.au> writes:
Chris> I am adding pretty printers for RTEMS to gdb. In the RTEMS operating
Chris> system elements such as a semaphore are given an id. I would like to
Chris> print the actual semaphore data given a semaphore id. To do this I
Chris> need to read a kernel structure from a table indexed via a bit field
Chris> in the id. As an example the semaphore's table is declared in RTEMS
Chris> as:
Chris> RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information;
This isn't really enough information for us to help you.
What does Objects_Information look like?
Chris> I am stuck on how to create a new gdb.Value variable in Python.
Use gdb.parse_and_eval. This wasn't added until after 7.0.
Tom