From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44075 invoked by alias); 8 Dec 2016 20:08:51 -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 43042 invoked by uid 89); 8 Dec 2016 20:08:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*MI:sk:7e2fac4, H*i:sk:7e2fac4, H*f:sk:7e2fac4 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Dec 2016 20:08:48 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 7642410A995; Thu, 8 Dec 2016 15:08:46 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org, Luis Machado Cc: binutils@sourceware.org Subject: Re: [PATCH v2 2/3] Add FreeBSD/mips architecture. Date: Thu, 08 Dec 2016 20:08:00 -0000 Message-ID: <3686876.pSvlj3YOXd@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <7e2fac43-8a37-2883-1e91-1a95a5d767f2@codesourcery.com> References: <20161206210015.40422-1-jhb@FreeBSD.org> <20161206210015.40422-3-jhb@FreeBSD.org> <7e2fac43-8a37-2883-1e91-1a95a5d767f2@codesourcery.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00216.txt.bz2 On Thursday, December 08, 2016 12:47:42 PM Luis Machado wrote: > On 12/06/2016 03:00 PM, John Baldwin wrote: > > +static void > > +mips_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) > > +{ > > + enum mips_abi abi = mips_abi (gdbarch); > > + > > + /* Generic FreeBSD support. */ > > + fbsd_init_abi (info, gdbarch); > > + > > + set_gdbarch_software_single_step (gdbarch, mips_software_single_step); > > + > > + switch (abi) > > + { > > + case MIPS_ABI_O32: > > + tramp_frame_prepend_unwinder (gdbarch, &mips_fbsd_sigframe); > > + break; > > + case MIPS_ABI_N32: > > + break; > > + case MIPS_ABI_N64: > > + tramp_frame_prepend_unwinder (gdbarch, &mips64_fbsd_sigframe); > > + break; > > + } > > + > > + set_gdbarch_iterate_over_regset_sections > > + (gdbarch, mips_fbsd_iterate_over_regset_sections); > > + > > + /* FreeBSD/mips has SVR4-style shared libraries. */ > > + set_solib_svr4_fetch_link_map_offsets > > + (gdbarch, (gdbarch_ptr_bit (gdbarch) == 32 ? > > + mips_fbsd_ilp32_fetch_link_map_offsets : > > + mips_fbsd_lp64_fetch_link_map_offsets)); > > +} > > + > > + > > Do we need to set a reasonable default in case abi is something unknown > or undefined? Maybe as a fail-safe? Default in which sense, for the sigframe unwinder or something else? I don't think there's any support in any toolchains I'm aware of to generate FreeBSD binaries with other ABIs (no O64 in particular). -- John Baldwin