From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23568 invoked by alias); 15 Feb 2002 13:45:26 -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 23449 invoked from network); 15 Feb 2002 13:45:21 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 15 Feb 2002 13:45:21 -0000 Received: by fw-cam.cambridge.arm.com; id NAA18178; Fri, 15 Feb 2002 13:45:20 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma017511; Fri, 15 Feb 02 13:44:28 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id NAA29583 for ; Fri, 15 Feb 2002 13:44:28 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id NAA17232; Fri, 15 Feb 2002 13:44:27 GMT Message-Id: <200202151344.NAA17232@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: gdb-patches@sources.redhat.com cc: Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: RFC ARM multi-arch and object format detection In-reply-to: Your message of "Thu, 14 Feb 2002 18:37:07 GMT." <200202141837.SAA25550@cam-mail2.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Feb 2002 05:45:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-02/txt/msg00427.txt.bz2 Right, I've revised the patch slightly and committed it. The main difference is that with a flash of inspiration last night as I was driving home from work, I realized that there is a simple way to support the multiple ABI variants and their corresponding tdep files without having to always link all of them into a single gdb session (you can do if you want, but it's not required). The new patch adds a new arm-specific gdbarch registration function (arm_gdbarch_register_os_abi) to arm-tdep.c, using which the other arm tdep files can register their ability to handle that ABI variant. ABI detection is still handled by the common code -- a design decision which I think is correct, but can be changed at a later date. It is acceptable for a tdep file to register the ability to handle more than one abi variant, but it is not acceptable to have more than one tdep file trying to handle a variant. 2002-02-15 Richard Earnshaw * arm-tdep.h (enum arm_abi): New enum. (struct gdbarch_tdep): New structure. (LOWEST_PC): Provide a default. (arm_gdbarch_register_os_abi): Declare new function. * arm-tdep.c (arm_abi_names): New array. (process_note_abi_tag_sections): New function. (get_elfosabi): New function. (arm_gdbarch_register_os_abi): New function. (arm_gdbarch_init): Try to determine the ABI of the inferior. If support for that ABI has been built in, then call the appropriate configuration routine. Use gdbarch_num_regs() to get the number of registers. (arm_dump_tdep): New function. (arm_init_abi_eabi_v1, arm_init_abi_eabi_v2, arm_init_abi_apcs): New place-holder functions. (_initialize_arm_tdep): Register them. * config/arm/tm-arm.h (LOWEST_PC): Delete. * armnbsd-tdep.c: New file. * Makefile.in (armnbsd-tdep.o): Add dependencies. * config/arm/nbsd.mt (TDEPFILES): Add it. * config/arm/tm-nbsd.h (LOWEST_PC): Delete. * armnbsd-nat.c: Include regcache.h. * Makefile.in (armnbsd-nat.o): Update dependency list. * arm-tdep.c (arm_get_next_pc): Use printf_filtered for error message.