From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: GDB Discussion Subject: Re: A better register interface Date: Thu, 15 Feb 2001 18:54:00 -0000 Message-id: <3A8C9561.75AB3F92@cygnus.com> References: <3A8B5C60.92EEABA3@cygnus.com> X-SW-Source: 2001-02/msg00199.html 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