From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129256 invoked by alias); 28 May 2018 12:23:44 -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 129240 invoked by uid 89); 28 May 2018 12:23:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:amazonses.com, Hx-languages-length:1251, linkedin, cofounder X-HELO: a2-123.smtp-out.eu-west-1.amazonses.com Received: from a2-123.smtp-out.eu-west-1.amazonses.com (HELO a2-123.smtp-out.eu-west-1.amazonses.com) (54.240.2.123) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 May 2018 12:23:40 +0000 Subject: Re: [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?Corinna_Vinschen?= , =?UTF-8?Q?Pedro_Alves?= Cc: =?UTF-8?Q?gdb-patches=40sourceware=2Eorg?= Date: Mon, 28 May 2018 12:49:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit In-Reply-To: <20180528104153.GA3501@calimero.vinschen.de> References: <20180517082631.26855-1-julio@farjump.io> <010201636d368a34-7edcde92-3661-4c9a-94b4-a894b9c8e90a-000000@eu-west-1.amazonses.com> <9445cc6c-a954-7cdf-d0dc-47a18e596db3@redhat.com> <20180528104153.GA3501@calimero.vinschen.de> <6f5980ae-247c-1991-ba3c-884fe04a94c5@farjump.io> Message-ID: <01020163a6b434b4-79b66ed1-e2f7-4333-b7cc-94986e13b161-000000@eu-west-1.amazonses.com> X-SES-Outgoing: 2018.05.28-54.240.2.123 Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00732.txt.bz2 > The idea was that st_dev values on one system don't make sense on > another system. Also, st_dev values for files reflect the underlying > partition on the inferior system, which doesn't mean anything to the GDB > host system. > > I don't know how important backward compat is here, but there may > be code out there which still relies on the simple file vs. console > st_dev from stat(). Version check? > > Other than that, if you think that this is an outdated approach, just > make sure to change the docs as well. I think the approach is still valid, otherwise it would be like if the target program should know the host. Which reminds me that with remote_fileio_fstat(), I have the case where my host st_dev has 64 bits, which doesn't fit into fileio's 32-bit fst_dev. I think I should resubmit this patch along with my other patch allowing to "open non regular files" so that I add common device ids (link, fifo, etc.) to the list of returned fst_dev, and I modify remote_fileio_fstat() so that it applies the same values to fst_dev. -- Julio Guerra Co-founder & CTO of Farjump Mobile: +33 618 644 164 LinkedIn: https://linkedin.com/in/guerrajulio Slack: farjump.slack.com