From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21150 invoked by alias); 27 May 2014 08:51:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21127 invoked by uid 89); 27 May 2014 08:51:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp13.uk.ibm.com Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 27 May 2014 08:51:15 +0000 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 May 2014 09:51:11 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 May 2014 09:51:10 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 709EF1B08069 for ; Tue, 27 May 2014 09:51:29 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4R8p9Ig66977866 for ; Tue, 27 May 2014 08:51:09 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4R8p9Hv029777 for ; Tue, 27 May 2014 04:51:09 -0400 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-188.boeblingen.de.ibm.com [9.152.212.188]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s4R8p8iB029748; Tue, 27 May 2014 04:51:08 -0400 From: Andreas Arnez To: Yao Qi Cc: , Andreas Schwab Subject: Re: [PATCH 11/12] M68K Linux: Define regset structures. References: <1401122208-2481-1-git-send-email-arnez@linux.vnet.ibm.com> <1401122208-2481-12-git-send-email-arnez@linux.vnet.ibm.com> <5383EBE5.4060709@codesourcery.com> Date: Tue, 27 May 2014 08:51:00 -0000 In-Reply-To: <5383EBE5.4060709@codesourcery.com> (Yao Qi's message of "Tue, 27 May 2014 09:35:33 +0800") Message-ID: <87bnuj7gg3.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14052708-2966-0000-0000-00000B6DC663 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00656.txt.bz2 On Tue, May 27 2014, Yao Qi wrote: > On 05/27/2014 12:36 AM, Andreas Arnez wrote: >> +/* Return the appropriate register set for the core section identified >> + by SECT_NAME and SECT_SIZE. */ >> + >> +static const struct regset * >> +m68k_linux_regset_from_core_section (struct gdbarch *gdbarch, >> + const char *sect_name, >> + size_t sect_size) >> +{ >> + if (strcmp (sect_name, ".reg") == 0 >> + && sect_size >= M68K_LINUX_GREGS_SIZE) >> + return &m68k_linux_gregset; >> + >> + if (strcmp (sect_name, ".reg2") == 0 >> + && sect_size >= M68K_LINUX_FPREGS_SIZE) >> + return &m68k_linux_fpregset; >> + >> + return NULL; >> +} >> + >> static void >> m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) >> { >> @@ -361,6 +422,10 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) >> >> set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); >> >> + /* Core file support. */ >> + set_gdbarch_regset_from_core_section >> + (gdbarch, m68k_linux_regset_from_core_section); >> + > > Is it intended to include this change in this patch? or it should go > to the next patch series? It is intended here, such that the register sets are actually used by linux_nat_collect_thread_registers and get_core_register_section. If I didn't miss anything, M68K and IA64 were the only Linux targets without regset_from_core_section gdbarch methods before. After the patch series all Linux targets should have them, and all their regsets should have supply- *and* collect methods.