Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Chris Johns <chris@contemporary.net.au>
To: gdb@sourceware.org
Subject: Reading a static variable in Python
Date: Wed, 10 Mar 2010 03:38:00 -0000	[thread overview]
Message-ID: <4B971421.8080006@contemporary.net.au> (raw)

Hello,

I am adding pretty printers for RTEMS to gdb. In the RTEMS operating 
system elements such as a semaphore are given an id. I would like to 
print the actual semaphore data given a semaphore id. To do this I need 
to read a kernel structure from a table indexed via a bit field in the 
id. As an example the semaphore's table is declared in RTEMS as:

RTEMS_SEM_EXTERN Objects_Information  _Semaphore_Information;

How would I read the 10 element of the _Semaphore_Information in Python ?

I am stuck on how to create a new gdb.Value variable in Python.

Thanks
Chris


             reply	other threads:[~2010-03-10  3:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10  3:38 Chris Johns [this message]
2010-03-10 17:05 ` Tom Tromey
2010-03-11  1:49   ` Chris Johns
2010-03-11 16:53     ` Tom Tromey
2010-03-11 17:15       ` Phil Muldoon
2010-03-11 17:58         ` Tom Tromey
2010-03-11 23:40       ` Chris Johns

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B971421.8080006@contemporary.net.au \
    --to=chris@contemporary.net.au \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox