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: [PATCH 4/5] Add "target:" filename handling to find_separate_debug_file


Pedro Alves wrote:
> On 06/16/2015 10:42 AM, Gary Benson wrote:
> > This commit updates find_separate_debug_file to handle filenames
> > prefixed with "target:".  The same-directory and
> > DEBUG_SUBDIRECTORY locations are checked with the prefix if
> > supplied.  The debugdir location is checked both with and without
> > the prefix if one is supplied.  This makes GDB able to fetch
> > separate debug files from remote targets and from inferiors in
> > containers.
> > 
> > +      /* Try the same location but without TARGET_SYSROOT_PREFIX
> > +	 (i.e. on the local filesystem).  */
> > +      debugfile = build_debug_file_name (no_prefix, debugdir, dir,
> > +					 debuglink, NULL);
> 
> Given that we have a CRC to match, shouldn't we try the local
> filesystem first, avoiding the (potentially slow) remote fetching
> in the case the files on the container/remote are the same of
> the host's?  (which I think happens often with containers).

I think for both remote and container cases the answer to "are they
the same" is no more than "they might be".

With containers, "target:" fetching shouldn't be very much slower
than local-filesystem fetching, just a couple more operations at
file open time.  With remote it will be slower, but less likely
to be the same (maybe!)

That was my reasoning.  I can switch it round if you want though.
Let me know what you'd like...

Cheers,
Gary

-- 
http://gbenson.net/


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