From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3985 invoked by alias); 20 Jul 2012 07:02:07 -0000 Received: (qmail 3971 invoked by uid 22791); 20 Jul 2012 07:02:06 -0000 X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,NAME_EMAIL_DIFF,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from hubext03.fsdata.se (HELO smtp04.fsdata.se) (195.35.82.72) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jul 2012 07:01:52 +0000 Received: from hubext01.HMC.local (192.168.46.130) by hubext03.HMC.local (192.168.46.132) with Microsoft SMTP Server (TLS) id 8.1.436.0; Fri, 20 Jul 2012 09:01:49 +0200 Received: from MBXVS01.HMC.local ([10.76.0.120]) by hubext01.HMC.local ([192.168.46.130]) with mapi; Fri, 20 Jul 2012 09:01:40 +0200 From: "sarah@hederstierna.com" To: "gdb@sourceware.org" Date: Fri, 20 Jul 2012 07:02:00 -0000 Subject: Make corefile support in arm-linux generic for arm-* ? Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00054.txt.bz2 Hi I'm looking into getting core-file support for ARM non-linux targets. Looking into 'arm-tdep.c' and 'arm-linux-tdep.c' I just wonder if it would = be possible to move possible generic parts up to 'arm-tdep.c' ? I was thinking core-file default support could possibly be initiated in 'ar= m-tdep.c' before calling /* Hook in the ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); I was thinking of eg. (from 'arm-linux-tdef.c': /* Core file support. */ set_gdbarch_regset_from_core_section (gdbarch, arm_linux_regset_from_core_section); set_gdbarch_core_read_description (gdbarch, arm_linux_core_read_descripti= on); if (tdep->have_vfp_registers) set_gdbarch_core_regset_sections (gdbarch, arm_linux_vfp_regset_section= s); else if (tdep->have_fpa_registers) set_gdbarch_core_regset_sections (gdbarch, arm_linux_fpa_regset_section= s); Just renaming stuff excluding '_linux_' and move functions to 'arm-tdef.c' = ? eg. arm_linux_regset_from_core_section ---> arm_regset_from_core_section arm_linux_core_read_description ---> arm_core_read_description arm_linux_vfp_regset_sections ---> etc arm_linux_fpa_regset_sections As I see it some parts seems quite generic and could be re-used for default= corefile hanlding, eg. bare-metal arm-targets. It would be really nice if it was possible to be able to run 'generate-core= file' and similar out-of-the-box from an ARM bare-metal toolchain. What do you think? Any other further ideas how to get default core-file support for ARM bare-m= etal non-linux targets are also welcome! :-) Thanks and Best Regards /Fredrik