From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3309 invoked by alias); 28 Feb 2010 19:24:59 -0000 Received: (qmail 3294 invoked by uid 22791); 28 Feb 2010 19:24:58 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Sun, 28 Feb 2010 19:24:54 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 57ACE6D42F5; Sun, 28 Feb 2010 20:24:52 +0100 (CET) Date: Sun, 28 Feb 2010 19:24:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] windows-nat.c: Cygwin: Port to Cygwin 1.7 Message-ID: <20100228192452.GR5683@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20100228150844.GH5683@calimero.vinschen.de> <837hpxcmp0.fsf@gnu.org> <20100228171828.GK5683@calimero.vinschen.de> <83wrxxb690.fsf@gnu.org> <20100228180133.GN5683@calimero.vinschen.de> <83tyt1b35h.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83tyt1b35h.fsf@gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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 X-SW-Source: 2010-02/txt/msg00701.txt.bz2 On Feb 28 20:56, Eli Zaretskii wrote: > > Date: Sun, 28 Feb 2010 19:01:33 +0100 > > From: Corinna Vinschen > > > > > > PATH_MAX, 4K, is more than enough especially since the names of DLLs > > > > are stored in a buffer which is restricted to SO_NAME_MAX_PATH_SIZE, > > > > which is 512 bytes ATM. > > > > > > I wasn't thinking about DLL names, I was thinking about source file > > > names and names of executable programs. > > > > The filename of executable and source files is not restricted to > > PATH_MAX. The code in windows-nat.c only handles DLLs. Otherwise, see > > utils.c, functions xfullpath() and gdb_realpath(). Cygwin provides the > > canonicalize_file_name function. > > In that case, how about a comment explaining the limitation of > SO_NAME_MAX_PATH_SIZE somewhere ion windows-nat.c, and how PATH_MAX > does not limit that? Sure. I added a comment to get_module_name: #ifdef __CYGWIN__ wchar_t pathbuf[PATH_MAX]; /* Temporary storage prior to converting to posix form. PATH_MAX is always enough as long as SO_NAME_MAX_PATH_SIZE is defined as 512. */ #endif Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat