From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id udjSODjcY2ClewAAWB0awg (envelope-from ) for ; Tue, 30 Mar 2021 22:19:36 -0400 Received: by simark.ca (Postfix, from userid 112) id D89AD1EE0E; Tue, 30 Mar 2021 22:19:36 -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 3A8A11E783 for ; Tue, 30 Mar 2021 22:19:36 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 640D73858001; Wed, 31 Mar 2021 02:19:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 640D73858001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617157175; bh=oBvzUaTUAdTjrdVmSMdk5wpOFs8t7Ol9ke2EvUoTPI4=; 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=QwbzpMOx7cNAGRbqInfaD8l6vjkzjTSS4InWlbo/rbspe26/HD9Yh/M+X7zf8wrAv lezBhhdPeylTV45HjLlUKXvD8ZR1VW/KoRgEakBQZDlrnBKTzv1JZlgc+7s1IpzGIy Y8lO8H+DfoFk3Q3qSaYL9Z7UWn77gUO8ZNOfPsJ4= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6037E3858001 for ; Wed, 31 Mar 2021 02:19:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6037E3858001 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 4172A335CCD; Wed, 31 Mar 2021 02:19:31 +0000 (UTC) Date: Tue, 30 Mar 2021 22:19:31 -0400 To: Faraz Shahbazker Subject: Re: [PATCH v1] 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: <20210328093206.15977-1-fshahbazker@wavecomp.com> <20210330212109.676809-1-fshahbazker@wavecomp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210330212109.676809-1-fshahbazker@wavecomp.com> 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 31 Mar 2021 02:51, Faraz Shahbazker wrote: > sim/mips/ChangeLog > * interp.c (sim_monitor): Add switch entries for unlink (13), > lseek (14), and stat (15). > > Derived from patch authored by Steve Ellcey mostly looks good. just one thing ... > --- a/sim/mips/interp.c > +++ b/sim/mips/interp.c > + if (cb_syscall (cb, &s) != CB_RC_OK) > + { > + abort (); > + sim_engine_halt (sd, cpu, NULL, mips_pc_get (cpu), > + sim_stopped, SIM_SIGILL); > + } why the abort ? sim_engine_halt should be more than sufficient to throw an error & shut everything down. abort will kill the process which is bad when we're using the sim as a library embedded into another program/runtime. -mike