public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Julio Guerra <guerr@julio.in>
Cc: gdb-patches@sourceware.org, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [PATCH 1/4] Remove the restriction of File I/O functions to regular files only
Date: Mon, 30 Apr 2018 01:54:00 -0000	[thread overview]
Message-ID: <7780a3797deb810719caf4568cf2cb9a@polymtl.ca> (raw)
In-Reply-To: <20180428011940.115515-2-julio@farjump.io>

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  <julio@farjump.io>
> 
> 	* 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

  reply	other threads:[~2018-04-30  1:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-28  1:19 [PATCH 0/4] Some File I/O improvements for embedded programming Julio Guerra
2018-04-28  1:19 ` [PATCH 2/4] Do not clear the value of st_dev in File I/O's stat() Julio Guerra
2018-04-28  1:19 ` [PATCH 4/4] Install gdb/fileio.h Julio Guerra
2018-04-28  1:19 ` [PATCH 1/4] Remove the restriction of File I/O functions to regular files only Julio Guerra
2018-04-30  1:54   ` Simon Marchi [this message]
2018-04-28  1:19 ` [PATCH 3/4] Explicit fixed-width integral File I/O protocol types Julio Guerra
2018-05-02 10:46   ` Pedro Alves
     [not found]     ` <332abe88-4b88-3f06-7141-31a798f2b153@farjump.io>
2018-05-02 15:18       ` Julio Guerra
2018-05-02 16:14         ` Joel Brobecker
     [not found]           ` <a5149a53-09e3-2a08-607a-38d81dfa5eac@farjump.io>
2018-05-02 16:31             ` Julio Guerra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7780a3797deb810719caf4568cf2cb9a@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=guerr@julio.in \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).