From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11564 invoked by alias); 17 Apr 2015 17:28:28 -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 11555 invoked by uid 89); 17 Apr 2015 17:28:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ob0-f181.google.com Received: from mail-ob0-f181.google.com (HELO mail-ob0-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Apr 2015 17:28:26 +0000 Received: by obfe9 with SMTP id e9so75425200obf.1 for ; Fri, 17 Apr 2015 10:28:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=7qUKRa/0bOUXMLIvvff7wKIs/HWuLyQvoGVxJQBDjoI=; b=jxsqHqn/piz0AOd3rPrAhR2lyKKioE7NlKjThra3PVkZwaUU0J+NDbxybnRCl4yB77 3qy9/L9jW3LcS142IjaC4rrPD98lBaBfy3FLSQMDG0wG8XA7bW3pzi+UOtj4wHOPYV8V azE8QAW0v1Q1hd9/sjrwuckDt5Q9mDCf/JcQBGRAQ9MNqxkdUnV7DkfhvICnMKOxF9ZU ZeoNhsohp6baMIjVwaKvF2T241e+YJ1yF10I/rxARFIg+Tm0QGqdIUYuziS6Kb/NCjyi A7eYAmHdl29KsbWczItkvdG+CkUTXs2K5GtV9gaDY1cVSYUHbejKwhFb3nComwob1+NX WoZQ== X-Gm-Message-State: ALoCoQmlZXyfmAcx5N8M/Th6Po0dMXqFl+CkmTGcXZ6CF7yeeMqBx71Oo02vyZ7PLNH13T4kgQ2l MIME-Version: 1.0 X-Received: by 10.182.115.167 with SMTP id jp7mr3994557obb.21.1429291704767; Fri, 17 Apr 2015 10:28:24 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Fri, 17 Apr 2015 10:28:24 -0700 (PDT) In-Reply-To: <553116EB.6050508@redhat.com> References: <1429186791-6867-1-git-send-email-gbenson@redhat.com> <1429186791-6867-3-git-send-email-gbenson@redhat.com> <20150417133628.GA26681@blade.nx> <553116EB.6050508@redhat.com> Date: Fri, 17 Apr 2015 17:28:00 -0000 Message-ID: Subject: Re: [PATCH 2/7] Introduce target_fileio_set_fs From: Doug Evans To: Pedro Alves Cc: Gary Benson , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00699.txt.bz2 On Fri, Apr 17, 2015 at 7:21 AM, Pedro Alves wrote: > On 04/17/2015 02:36 PM, Gary Benson wrote: > >> It was basically because the alternative was to add a parameter to >> target_filesystem_is_local and target_fileio_{open,readlink,unlink} >> (and all their target vector implementations) to pass around whatever >> inferior you were talking about. You'd also have to make a lot more >> changes to the remote protocol: either vFile:{open,unlink,readlink} >> would need an extra argument (indicated with qSupported) or you'd need >> new "fs" versions of each packet. Both Pedro and I thought that was >> ugly. > > Right, this way mirrors what's done at the posix/system call level too, > and if some other systems needs something different for selecting > a "filesystem namespace", there's a single method/packet to change. Fair enough. All I would ask is that this get pushed down as far as possible in the call stack. E.g., while I wouldn't suggest massive changes to the remote protocol (regardless of how desperately IWBN), IWBN that layers above that follow good programming practices (avoiding using global state wherever possible/reasonable).