This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] windows-nat.c: Cygwin: Port to Cygwin 1.7


On Feb 28 20:56, Eli Zaretskii wrote:
> > Date: Sun, 28 Feb 2010 19:01:33 +0100
> > From: Corinna Vinschen <vinschen@redhat.com>
> > 
> > > > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]