From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127957 invoked by alias); 17 May 2018 08:28:07 -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 127943 invoked by uid 89); 17 May 2018 08:28:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: a6-226.smtp-out.eu-west-1.amazonses.com Received: from a6-226.smtp-out.eu-west-1.amazonses.com (HELO a6-226.smtp-out.eu-west-1.amazonses.com) (54.240.6.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 May 2018 08:28:04 +0000 Subject: [PATCH] Do not clear the value of st_dev in File I/O's stat() From: =?UTF-8?Q?Julio_Guerra?= To: =?UTF-8?Q?gdb-patches=40sourceware=2Eorg?= Cc: =?UTF-8?Q?Pedro_Alves?= , =?UTF-8?Q?Julio_Guerra?= Date: Thu, 17 May 2018 10:32:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <20180517082631.26855-1-julio@farjump.io> X-Original-Mailer: git-send-email 2.17.0 Message-ID: <010201636d368a34-7edcde92-3661-4c9a-94b4-a894b9c8e90a-000000@eu-west-1.amazonses.com> X-SES-Outgoing: 2018.05.17-54.240.6.226 Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00373.txt.bz2 Do not clear the value of st_dev in the fileio stat structure sent to the=0D target. It prevents from being able to check the file type on the target.=0D Note that the fileio function fstat `remote_fileio_func_fstat()` doesn't cl= ear=0D this field.=0D =0D 2018-05-16 Julio Guerra =0D =0D * remote-fileio.c: do not clear the value of st_dev in File I/O's stat().= =0D =0D Signed-off-by: Julio Guerra =0D ---=0D gdb/ChangeLog | 4 ++++=0D gdb/remote-fileio.c | 1 -=0D 2 files changed, 4 insertions(+), 1 deletion(-)=0D =0D diff --git a/gdb/ChangeLog b/gdb/ChangeLog=0D index 7217be67b6..34e7995e5a 100644=0D --- a/gdb/ChangeLog=0D +++ b/gdb/ChangeLog=0D @@ -1,3 +1,7 @@=0D +2018-05-16 Julio Guerra =0D +=0D + * remote-fileio.c: do not clear the value of st_dev in File I/O's stat().= =0D +=0D 2018-05-16 Julio Guerra =0D =0D * remote-fileio.c: allow using File I/O function open() with special=0D diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c=0D index fa3cb15033..e855c682a0 100644=0D --- a/gdb/remote-fileio.c=0D +++ b/gdb/remote-fileio.c=0D @@ -870,7 +870,6 @@ remote_fileio_func_stat (char *buf)=0D if (statptr)=0D {=0D host_to_fileio_stat (&st, &fst);=0D - host_to_fileio_uint (0, fst.fst_dev);=0D =0D errno =3D target_write_memory (statptr, (gdb_byte *) &fst, sizeof fs= t);=0D if (errno !=3D 0)=0D -- =0D 2.17.0=0D =0D