watch memory mapped io registers

Keith Seitz keiths@redhat.com
Fri Jul 13 17:39:00 GMT 2007


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



More information about the Insight mailing list