From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31276 invoked by alias); 17 Aug 2002 23:48:38 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31255 invoked from network); 17 Aug 2002 23:48:34 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 17 Aug 2002 23:48:34 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7822C3CCB for ; Sat, 17 Aug 2002 19:48:22 -0400 (EDT) Message-ID: <3D5EE0C6.7080902@ges.redhat.com> Date: Sat, 17 Aug 2002 16:48:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020810 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Register Groups (again) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00197.txt.bz2 See: http://sources.redhat.com/ml/gdb/2001-02/msg00268.html for the origins of this idea. I'd like to propose a new object ``struct reggroup'' and a number of methods: struct reggroup; // the opaque object // Some predefined register groups struct reggroup *general_reggroup; struct reggroup *float_reggroup; struct reggroup *system_reggroup; struct reggroup *vector_reggroup; struct reggroup *all_reggroup; // architecture method indicating membership of a register group int register_reggroup_p (gdbarch, regnum, reggroup); // The reggroup's attributes const char *reggroup_name (reggroup); // Null terminated list of the architectures reggroups struct reggroup **reggroups (gdbarch); // Add a custom register group to an architecture struct reggroup *reggroup_add (gdbarch, name, other attributes?); A default register group function could look something like: if all group return 1 if float group and register's type is float return 1; if vector group and register's type is vector return 1; if general group and register's type isn't float or vector return 1 return 0 And the ``info registers', ``info float'', ``info all-registers'' and ``info vector'' (``info system''?) commands would then use it. The big gapeing holes in this proposal are: - an MI/GUI interface. The above interface provides: for (regnum = 0; regnum < NUM_REGS+NUM_PSEUDO_REGS; regnum++) if (register_reggroup_p (arch, regnum, XXXX_group) .... I guess that would be abstracted somehow. Somebody elses problem though :-) - how it relates to frames It currently assumes that the register groups are identical between frames :-/ comments, thoughts? Andrew PS: I guess this gets written up and goes into the ``Registers'' chapter.