This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Re: watch memory mapped io registers
- From: Keith Seitz <keiths at redhat dot com>
- To: micros at valvers dot com
- Cc: insight at sourceware dot org
- Date: Fri, 13 Jul 2007 10:39:05 -0700
- Subject: Re: watch memory mapped io registers
- References: <468A7BC6.6070102@valvers.com>
Brian Sidebotham wrote:
Insight correctly evaluates the pointer and displays the contents of
that memory region. However, it would be *MUCH* easier if I could assign
that pointer with the register name, in this case it would be MAMTIM.
I thought about maybe trying to use gdb's convenience variables, but
that doesn't seem to work quite right. It doesn't recognize the variable
as dynamic, i.e., "set $MAMTIM=(unsigned int *)0xe01fc004" will do a
one-time access of the register, and the value of $MAMTIM will remain fixed.
I don't believe there is any current way to do this in insight, although
it could be added. The variables in the watch and locals windows use a
gdb subsystem called "varobj": it creates "variable objects" which
represent variables, memory, or just about anything similar in the
target/inferior. Using varobj, you should be able to do what you want by
extending insight in some way (probably a plugin).
Your best, most simple bet is to ask the gdb mailing list how to
accomplish this using the console. If that can be done, it is probably a
lot easier to get insight to use that information than the other way
around. They may just tell you to hack at the target file for this and
add your register/memory mapping there (which would give insight instant
access to it).
Keith