From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by sourceware.org (Postfix) with ESMTPS id 09121384C002 for ; Sun, 30 May 2021 07:09:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 09121384C002 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=npickito@gmail.com Received: by mail-yb1-xb2a.google.com with SMTP id r8so11894349ybb.9 for ; Sun, 30 May 2021 00:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1oLisPwoxiCiM/ggI5AjEb4xOHH6TYsN3oLrnraQPdk=; b=LStIJnXNhDpG/Blm6+AjapqJNhcZX+RNUSTeeBc1cPuEcxLRcrcI/+yQNQDYahGElU JGpp2Dh3fkL4YQTiQTi0kJW/CiY6SePvc55H4mZlr9RVvdlftbU9qMu1hxl721mBzGE3 GBC6F7GcVpROLjDkEKbF7x/J5MOYUJjeuwBDvBtWbmUka6E1fjMcqoKR9W1WfH2r6lL3 WPdrGLNdCUKfOqvSzR7IPeruGOSwfWDwT+jJr7wG1B8z8Z2PaEV38xrh4mYQkPCfv7Tc 4Ucr1KRKiRuRnFyuP635mtVt62HobMq9TYX8h7eLu2n4kBKzA7RaPFR3Fg9oxcvOdBJl PczA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1oLisPwoxiCiM/ggI5AjEb4xOHH6TYsN3oLrnraQPdk=; b=ccFfymTaEGyO+jKq1PJ95Nf1sVNq/WuwQK+uJVKgQ5soJvgZGaShJqjy1Tov88PjuY J+TXz6MhstXtxFO9EJ72x182X3TbmywA/rhKLsh/oFVwkveYd8V38EXLo8wl1lk38LrP 3hTWoHQlrb47+YNrlJiW2PFFyP2Gk6koIllEy+BdLm2cq4oyyCoa1dC5DZbn5pmDeUhr igSK35hbkvRr24hWBMwx2wXumIyQGxIXcst2vPKj925lHWVTTNyBPHmDOR7oGQAi8UnT ZDKNU+wpDU5erM/KYQ+Qmx3OxkeYff2rYCWIodYPPmo8krs9n/xib5MJY3F49ajWkQq8 OJUw== X-Gm-Message-State: AOAM531EPeU5I6viTUW1nE29l0gSxrJyNiY4KOqNKn3rE5f0zBNDVTpG w7m52s6SLl1/oH7+KMiLHs8mG7u077sEx8t0WY6OxNNZ3H8/eg== X-Google-Smtp-Source: ABdhPJyocOPCWmrQt2TUW4Qvtfg7aodxnFoYP9rpEn3cYQHELiOBO07zbABkCMJ59Of1ZR0hMv3s3kVkoAU47K+6m3Q= X-Received: by 2002:a25:be09:: with SMTP id h9mr25019673ybk.239.1622358553461; Sun, 30 May 2021 00:09:13 -0700 (PDT) MIME-Version: 1.0 References: <001001d753a1$d9c3d910$8d4b8b30$@linux.alibaba.com> In-Reply-To: <001001d753a1$d9c3d910$8d4b8b30$@linux.alibaba.com> From: Kito Cheng Date: Sun, 30 May 2021 15:09:02 +0800 Message-ID: Subject: Re: [RISCV] Why use SEMIHOST_flen for stat on RISCV? To: lifang_xia@linux.alibaba.com Cc: Newlib Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2021 07:09:15 -0000 It's listed on RISC-V semihost spec, and both OpenOCD and Qemu support SEMIHOST_flen, so I would suggest you implement that on gdb. On Fri, May 28, 2021 at 5:30 PM wrote: > > Hi, > > Recently, when using semihosting to do some test in a project, I found that > the stat syscall of RISCV uses SEMIHOST_flen, but this syscall is not in the > GDB file-IO support list. Only supported in openOCD. > > What are the considerations for doing this? May I modify it to "stat" and > "fstat" supported by GDB's FILE-IO? > > > > Thanks, > > Lifang Xia. >