This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: A better register interface
- To: GDB Discussion <gdb at sources dot redhat dot com>
- Subject: Re: A better register interface
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 15 Feb 2001 21:50:09 -0500
- References: <3A8B5C60.92EEABA3@cygnus.com>
Andrew Cagney wrote:
> cooked_register_name(frame, REGNUM)
> cooked_register_type(frame, REGNUM)
> provides the size implicitly
> read_cooked_register(frame, REGNUM, buf, sizeof buf)
> write_cooked_register(frame, REGNUM, buf, sizeof buf)
> along with a few others such as:
> cooked_register_attrib_p (frame, REGNUM, some attribute - is FP?)
I should expand a little. Attatching the frame to the COOKED register
methods is so that GDB can clearly handle the situtation where the
ISA/ABI change as you move up/down the stack.
Given the frame you can determine the PC and SP and hence the actual
mode of the CPU at that point. That in turn allows you to correctly
display the registers that apply to that frame.
Eventually, the architecture/abi objects could be simply attatched to
the frame, rather than having to look them up.
Andrew