From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2941 invoked by alias); 4 Dec 2003 21:43:08 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2933 invoked from network); 4 Dec 2003 21:43:08 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 4 Dec 2003 21:43:08 -0000 Received: by zenia.home (Postfix, from userid 5433) id E749820766; Thu, 4 Dec 2003 16:41:32 -0500 (EST) To: Ulrich Weigand Cc: gdb-patches@sources.redhat.com, uweigand@de.ibm.com Subject: Re: [PATCH] S/390 port modernization 1/4 References: <200312042006.VAA07701@faui1d.informatik.uni-erlangen.de> From: Jim Blandy Date: Thu, 04 Dec 2003 21:43:00 -0000 In-Reply-To: <200312042006.VAA07701@faui1d.informatik.uni-erlangen.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00143.txt.bz2 The regset_from_core_section stuff is done exactly the way the i386 and x86-64 do it, so I won't criticize it. But there are two things I wonder about: - Since core file formats are really OS-specific (ABI's often don't specify them), wouldn't it make more sense for the *-nat.c file to register an OS/ABI handler, and have that handler register the regset_from_core_section method? - Why does everyone allocate the 'struct regset' objects dynamically? The regset layouts are structures in header files, so there's only a static set of them; one could simply define initialized instances of 'struct regset', and the regset_from_core_section method could return them. That seems simpler than allocating them dynamically, and caching them in the tdep structure.