[2/2] Fix source file not found when part of the path does not exist but that a canonicalized path exists.
Message ID | 5515A5EE.7070102@ericsson.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 1743 invoked by alias); 27 Mar 2015 18:48:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1729 invoked by uid 89); 27 Mar 2015 18:48:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg20.ericsson.net Received: from usevmg20.ericsson.net (HELO usevmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 Mar 2015 18:48:17 +0000 Received: from EUSAAHC006.ericsson.se (Unknown_Domain [147.117.188.90]) by usevmg20.ericsson.net (Symantec Mail Security) with SMTP id 86.D3.12456.90055155; Fri, 27 Mar 2015 13:41:46 +0100 (CET) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.92) with Microsoft SMTP Server id 14.3.210.2; Fri, 27 Mar 2015 14:48:14 -0400 Message-ID: <5515A5EE.7070102@ericsson.com> Date: Fri, 27 Mar 2015 14:48:14 -0400 From: Antoine Tremblay <antoine.tremblay@ericsson.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org> Subject: Re: [PATCH 2/2] Fix source file not found when part of the path does not exist but that a canonicalized path exists. References: <1422994793-9861-1-git-send-email-antoine.tremblay@ericsson.com> <1422994793-9861-2-git-send-email-antoine.tremblay@ericsson.com> <54D12F84.3090004@ericsson.com> <55154BEB.9050104@redhat.com> In-Reply-To: <55154BEB.9050104@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes |
Commit Message
Antoine Tremblay
March 27, 2015, 6:48 p.m. UTC
On 03/27/2015 08:24 AM, Pedro Alves wrote: > On 02/03/2015 08:28 PM, Antoine Tremblay wrote: >> Hi, >> Unfortunately the 1/2 patch of this patchset failed because it's >> about 1M , and mailman is only accepting < 400k emails... >> >> The patch is large since I'm replacing canonicalize-lgpl from >> binutils with canonicalize and that triggers a few dependencies.. > > Eh, so large... What is it exactly pulling? It is pulling the following modules as dependencies to canonicalize : areadlink-with-size,bitrotate,chdir-long,cloexec,close,closedir,d-ino,dirname,dup,dup2,error,exitfail,fchdir,fcntl,fcntl-h,fd-hook,fdopendir,file-set,filename,filenamecat-lgpl,fstat,fstatat,getcwd,getcwd-lgpl,getdtablesize,gettext-h,hash,hash-pjw,hash-triple,intprops,mempcpy,memrchr,msvc-inval,msvc-nothrow,open,openat,openat-die,openat-h,opendir,readdir,realloc-posix,rewinddir,same,save-cwd,strdup-posix,strerror,strerror-override,strndup,strnlen,unistd-safer,xalloc,xalloc-die,xalloc-oversized,xgetcwd,xstrndup > >> >> Any ideas on how I should proceed ? >> >> I could send a patch with only the change to the update-gnulib.sh maybe ? > > Yes, please, along with any other changes outside import/. > I assume you'll need to change gdb/gnulib/Makefile.in too. > And be sure to explain why canonicalize-lgpl doesn't work > for what we need. I will add the changes outside of import at the end of this mail, however I think I should commit the whole thing otherwise someone else will have to do it... Maybe exceptionally you can review the patch on github ? (I've included the link later in the email) As to why canonizlize-gpl doesn't work : Since canonicalize-lgpl uses the system's realpath implementation, we can't canonicalize a path that does not exist on the current file system in it's uncanonicalized form. However this path may exist on the system in it's canonicalized form, this is actually common with some IDEs that use outside of tree builds and relative paths as documented in PR breakpoints/17497. I can add this to the patch comments.... > > Could you push the patches as a branch somewhere? That'd > make it trivial to pull/try them. Yes I've uploaded my patchset at : https://github.com/hexa00/binutils-gdb Regards, Antoine Patch outside of import (Note that Makefile.in is generated automatically so the only manual change is gdb/gnulib/update-gnulib.sh
Comments
On 03/27/2015 02:48 PM, Antoine Tremblay wrote: > On 03/27/2015 08:24 AM, Pedro Alves wrote: >> On 02/03/2015 08:28 PM, Antoine Tremblay wrote: >>> Hi, >>> Unfortunately the 1/2 patch of this patchset failed because it's >>> about 1M , and mailman is only accepting < 400k emails... >>> >>> The patch is large since I'm replacing canonicalize-lgpl from >>> binutils with canonicalize and that triggers a few dependencies.. >> >> Eh, so large... What is it exactly pulling? > > It is pulling the following modules as dependencies to canonicalize : > > areadlink-with-size,bitrotate,chdir-long,cloexec,close,closedir,d-ino,dirname,dup,dup2,error,exitfail,fchdir,fcntl,fcntl-h,fd-hook,fdopendir,file-set,filename,filenamecat-lgpl,fstat,fstatat,getcwd,getcwd-lgpl,getdtablesize,gettext-h,hash,hash-pjw,hash-triple,intprops,mempcpy,memrchr,msvc-inval,msvc-nothrow,open,openat,openat-die,openat-h,opendir,readdir,realloc-posix,rewinddir,same,save-cwd,strdup-posix,strerror,strerror-override,strndup,strnlen,unistd-safer,xalloc,xalloc-die,xalloc-oversized,xgetcwd,xstrndup > > >> >>> >>> Any ideas on how I should proceed ? >>> >>> I could send a patch with only the change to the update-gnulib.sh >>> maybe ? >> >> Yes, please, along with any other changes outside import/. >> I assume you'll need to change gdb/gnulib/Makefile.in too. >> And be sure to explain why canonicalize-lgpl doesn't work >> for what we need. > > I will add the changes outside of import at the end of this mail, > however I think I should commit the whole thing otherwise someone else > will have to do it... Maybe exceptionally you can review the patch on > github ? (I've included the link later in the email) > > As to why canonizlize-gpl doesn't work : > > Since canonicalize-lgpl uses the system's realpath implementation, we > can't canonicalize a path that does not exist on the current file system > in it's uncanonicalized form. > > However this path may exist on the system in it's canonicalized form, > this is actually common with some IDEs that use outside of tree builds > and relative paths as documented in PR breakpoints/17497. > > I can add this to the patch comments.... > >> >> Could you push the patches as a branch somewhere? That'd >> make it trivial to pull/try them. > > Yes I've uploaded my patchset at : https://github.com/hexa00/binutils-gdb > > Regards, > > Antoine > > Patch outside of import (Note that Makefile.in is generated > automatically so the only manual change is gdb/gnulib/update-gnulib.sh > > diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh > index 5c7238f..5845f09 100644 > --- a/gdb/gnulib/update-gnulib.sh > +++ b/gdb/gnulib/update-gnulib.sh > @@ -31,7 +31,7 @@ > # The list of gnulib modules we are importing in GDB. > IMPORTED_GNULIB_MODULES="\ > alloca \ > - canonicalize-lgpl \ > + canonicalize \ > dirent \ > dirfd \ > errno \ I forgot to mention if you have a recent debian or ubuntu with perl > 5.6 you will have problems running update-gnulib.sh you need to patch your automake 1.11.1 with the patch at : https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=aclocal-function-prototypes.debdiff;att=1;bug=752784 Actually this patch contains a quilt patchset you need to apply the patch inside this patchset...
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index 5c7238f..5845f09 100644 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -31,7 +31,7 @@ # The list of gnulib modules we are importing in GDB. IMPORTED_GNULIB_MODULES="\ alloca \ - canonicalize-lgpl \ + canonicalize \ dirent \ dirfd \ errno \