From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108613 invoked by alias); 30 Apr 2018 01:54:54 -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 108569 invoked by uid 89); 30 Apr 2018 01:54:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=answers, enhance, julio, opening X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 01:54:49 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w3U1sgCI014882 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 29 Apr 2018 21:54:47 -0400 Received: by simark.ca (Postfix, from userid 112) id 9F8871EF60; Sun, 29 Apr 2018 21:54:42 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 6BC401E17E; Sun, 29 Apr 2018 21:54:41 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 30 Apr 2018 01:54:00 -0000 From: Simon Marchi To: Julio Guerra Cc: gdb-patches@sourceware.org, Mike Frysinger Subject: Re: [PATCH 1/4] Remove the restriction of File I/O functions to regular files only In-Reply-To: <20180428011940.115515-2-julio@farjump.io> References: <20180428011940.115515-1-julio@farjump.io> <20180428011940.115515-2-julio@farjump.io> Message-ID: <7780a3797deb810719caf4568cf2cb9a@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 30 Apr 2018 01:54:42 +0000 X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00604.txt.bz2 Hi Julio, Thanks for the patch. I was not familiar with the fileio feature until now, but I have some generic comments (until someone that might be more familiar takes a look). We seem to have a test for fileio already, in testsuite/gdb.base/fileio.exp. The test sort of runs on native Linux, but I suppose it doesn't actually test fileio (the debugged program just accesses the filesystem directly). It's also not supported by gdbserver. Would it be possible for you to run this test using your target, see if if it passes before and after your patch? Also, it might be a good idea to enhance that test to check for the capabilities that this patch adds (opening/reading a non-regular file). If you (or Mike who is in CC) would know how to run it, maybe using some simulator available upstream, I'd be curious to know how. On 2018-04-27 21:19, Julio Guerra wrote: > The major goal is being able to write advanced embedded testing > functions, like: > - reading/writing to a dedicated fifo between the embedded program and > the host, > instead of using the GDB console only. > - mocking features based on host's. > > Tested with > https://github.com/farjump/raspberry-pi/blob/ea31c48d7c7eed27d39fb1bec2d3a1d308cb8ae7/src/semihosting/semihosting.c > > Also answers to an old RFC I did on the ML: > https://sourceware.org/ml/gdb/2016-07/msg00003.html > > 2018-04-28 Julio Guerra > > * gdb/remote-fileio.c: allow using File I/O functions with special > files. Remove the "gdb/" part of the filename (the name should be relative to the ChangeLog location), and capitalize "allow". Thanks, Simon