From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22319 invoked by alias); 3 Aug 2010 17:12:15 -0000 Received: (qmail 22311 invoked by uid 22791); 3 Aug 2010 17:12:14 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.17.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Aug 2010 17:12:07 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id o73HC4KP029517 for ; Tue, 3 Aug 2010 17:12:04 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o73HC4NQ1572958 for ; Tue, 3 Aug 2010 19:12:04 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o73HC42B031163 for ; Tue, 3 Aug 2010 19:12:04 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o73HC1fr031054; Tue, 3 Aug 2010 19:12:03 +0200 Message-Id: <201008031712.o73HC1fr031054@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 03 Aug 2010 19:11:55 +0200 Subject: Re: [RFC] corelow and multi-arch : Move deprecated_add_core_fns to set_gdbarch_regset_from_core_section To: teawater@gmail.com (Hui Zhu) Date: Tue, 03 Aug 2010 17:12:00 -0000 From: "Ulrich Weigand" Cc: gdb@sourceware.org In-Reply-To: from "Hui Zhu" at Aug 03, 2010 11:54:00 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-08/txt/msg00022.txt.bz2 Hui Zhu wrote: > This error because sniff_core_bfd return cris_elf_core_fns. So GDB > use cris_elf_core_fns.fetch_core_registers to analyze this mips core. > It return cris_elf_core_fns because core_sniffer of cris_elf_core_fns > and mips-linux-tdep.c:regset_core_fns is default_core_sniffer. > So I think this is not fit with the multi-arch. Yes, this is broken. -tdep files should never use deprecated_add_core_fns (in fact, *nobody* should use deprecated_add_core_fns, that's why it's deprecated :-/). > Do you think we can begin move deprecated_add_core_fns to > set_gdbarch_regset_from_core_section? What do you mean, "move"? The fix for problem is for someone who understands the relevant core file formats (and has access to a system they can test on) to implement gdbarch_regset_from_core_section for cris and/or mips, and then just remove deprecated_add_core_fns from those -tdep files. > BTW, core_vec->core_read_registers have a argument "which" that > gdbarch_regset_from_core_section doesn't have. Do you think we can > add one to it? No, gdbarch_regset_from_core_section instead gets the "name" argument, which is more general. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com