From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id pICvArDbY2CKewAAWB0awg (envelope-from ) for ; Tue, 30 Mar 2021 22:17:20 -0400 Received: by simark.ca (Postfix, from userid 112) id EFC8C1EE0E; Tue, 30 Mar 2021 22:17:19 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2A4E71E783 for ; Tue, 30 Mar 2021 22:17:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A29F3858001; Wed, 31 Mar 2021 02:17:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A29F3858001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617157038; bh=p0Db+I2EHAP1WwjTtpB3QTLlxOmnhdlz/87+RJAWRs0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=V+8i3CQsT/+tHySjHZhPAE/gpkhYx1iG+Rm487gyzKr9ZpkJBC0D/gThrHBoQxFY3 sh/IptN+OuQvbvZNMDlOQiAm23cQUfN98yxidgO0ObVn0tR30e+vnXaLLzLMG4KX5r 49GTsSdHgqehDo3B4pAOSup0tMx0JQiyethMtpME= Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 0F0043858001 for ; Wed, 31 Mar 2021 02:17:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F0043858001 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A220335CCD; Wed, 31 Mar 2021 02:17:14 +0000 (UTC) Date: Tue, 30 Mar 2021 22:17:14 -0400 To: Faraz Shahbazker Subject: Re: [EXTERNAL]Re: [PATCH] sim: mips: Add handlers to simulator monitor for unlink, lseek and stat Message-ID: Mail-Followup-To: Faraz Shahbazker , "gdb-patches@sourceware.org" , Chao-ying Fu References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: "gdb-patches@sourceware.org" , Chao-ying Fu Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 30 Mar 2021 21:20, Faraz Shahbazker wrote: > On 3/28/21 8:24 PM, Mike Frysinger wrote: > > On 28 Mar 2021 02:32, Faraz Shahbazker wrote: > >> sim/mips/ChangeLog * interp.c (sim_monitor): Add switch entries > >> for unlink (13), lseek (14), and stat (15). > > > > what ABI is sim_monitor supposed to be supporting ? it seems to be > > confused between IDT monitor & PMON, or at least out of sync with > > the libgloss code. > > Its a mixed bag but it seems to be in-sync with libgloss, as far as I understand. the IDT & PMON syscalls in libgloss conflict: idtmon.S:INDIRECT(open,6) idtmon.S:INDIRECT(read,7) idtmon.S:INDIRECT(write,8) idtmon.S:INDIRECT(close,10) pmon.S:INDIRECT(read,0) pmon.S:INDIRECT(write,1) pmon.S:INDIRECT(open,2) pmon.S:INDIRECT(close,3) pmon.S:INDIRECT(mon_ioctl,4) pmon.S:INDIRECT(mon_printf,5) pmon.S:INDIRECT(mon_vsprintf,6) pmon.S:INDIRECT(mon_ttctl,7) pmon.S:INDIRECT(mon_cliexit,8) so normally it'd be impossible to support both > PMON is partially re-mapped to IDT in interp.c:sim_open. MIPS moved sharply > to its own Unified Hosting Interface Layer in the recent years and this particular > patch arises out of the desire to maintain feature parity with UHI. i guess this is the trick that i missed: the PMON syscalls get hot patched to reroute to the IDT syscall table. thanks for the pointer. -mike