This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: A better register interface
Andrew Cagney wrote:
> It would consist of roughly:
>
> core-gdb
> \
> cooked-regs your-target
> \ /
> raw-regs-buffer
Actually, try this:
context
/ \ .----.
/ \ | |
/ frame---'
/ / \
continuation / \
| / \
| / \
| memcache regcache
| | |
..........................................
| | |
targ-run targ-mem targ-regs
Where:
context:
The execution thing that the user likes to manipulate. In the simple
case it represents a UNIX process with memory, stack and registers.
continuation:
The per context start/stop state. It keeps track of what the user/GDB
is trying to do to a context while the context is running.
frame:
Frames make up more than just the context stack. When moving between
frames, anything could change - the address space, registers,
architecture, target. GDB already tries to handle (badly) targets that
have architecture changes between frames.
memcache:
gdb's representation a target's memory address space.
regcache:
gdb's representation of a target's registers.
enjoy,
Andrew