From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61009 invoked by alias); 8 Dec 2016 18:47:50 -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 60969 invoked by uid 89); 8 Dec 2016 18:47:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Dec 2016 18:47:48 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cF3jO-000775-Tb from Luis_Gustavo@mentor.com ; Thu, 08 Dec 2016 10:47:46 -0800 Received: from [172.30.6.208] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 8 Dec 2016 10:47:43 -0800 Subject: Re: [PATCH v2 2/3] Add FreeBSD/mips architecture. References: <20161206210015.40422-1-jhb@FreeBSD.org> <20161206210015.40422-3-jhb@FreeBSD.org> To: John Baldwin , , Reply-To: Luis Machado From: Luis Machado Message-ID: <7e2fac43-8a37-2883-1e91-1a95a5d767f2@codesourcery.com> Date: Thu, 08 Dec 2016 18:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161206210015.40422-3-jhb@FreeBSD.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00213.txt.bz2 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? Other than that i have no further comments on this patch.