Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org,
	"Cédric Buissart" <cedric.buissart@gmail.com>,
	"Sandra Loosemore" <sandra@codesourcery.com>
Subject: Re: [PATCH 4/5] Add "target:" filename handling to find_separate_debug_file
Date: Fri, 24 Jul 2015 11:54:00 -0000	[thread overview]
Message-ID: <20150724115443.GA2608@blade.nx> (raw)
In-Reply-To: <20150724102801.GB29978@blade.nx>

Gary Benson wrote:
> Gary Benson wrote:
> > 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...
> 
> Given the slow remote transfers thread on the other list [1],
> I will switch it round (i.e. try locally first).
> --
> [1] https://sourceware.org/ml/gdb/2015-07/msg00038.html

Actually, I now discover that the reason I did it "target:" first
was that doing it the other way around clutters up the display
with loads of warnings if the two systems are different:

  Reading symbols from target:/usr/lib64/libpython2.6.so.1.0...
  warning: the debug information found in "/usr/lib/debug/usr/lib64/libpython2.6.so.1.0.debug" does not match "target:/usr/lib64/libpython2.6.so.1.0" (CRC mismatch).
  Reading symbols from target:/usr/lib/debug/usr/lib64/libpython2.6.so.1.0.debug...done.
  done.
  Reading symbols from target:/lib64/libpthread.so.0...
  warning: the debug information found in "/usr/lib/debug/lib64/libpthread-2.12.so.debug" does not match "target:/lib64/libpthread.so.0" (CRC mismatch).
  Reading symbols from target:/usr/lib/debug/lib64/libpthread-2.12.so.debug...done.
  done.
  ...etc...

If you're remote debugging over a slow link and have set gdb_sysroot
to some local copy then there will be no "target:" paths here so there
will be no slowdown with a target-first search.

If you're remote debugging with local debuginfo there will be some
slowdown due to failing vFile:open: packets.  One round trip per
executable/library to be precise.  Is this acceptable to you?

Cheers,
Gary

-- 
http://gbenson.net/


  reply	other threads:[~2015-07-24 11:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  9:42 [PATCH 0/5] Separate debugfile improvements Gary Benson
2015-06-16  9:42 ` [PATCH 2/5] Pre-strip now-unnecessary trailing directory separators Gary Benson
2015-07-01 13:45   ` Pedro Alves
2015-06-16  9:42 ` [PATCH 1/5] Introduce build_debug_file_name Gary Benson
2015-06-16 14:47   ` Eli Zaretskii
2015-06-17  9:47     ` Gary Benson
2015-06-17 16:42       ` Eli Zaretskii
2015-06-18 10:55         ` Gary Benson
2015-06-18 12:11           ` Eli Zaretskii
2015-06-19  8:32             ` Gary Benson
2015-07-01 11:05   ` Pedro Alves
2015-07-02 11:18     ` Gary Benson
2015-07-02 11:38       ` Pedro Alves
2015-07-02 13:53         ` Gary Benson
2015-07-25 16:20   ` Jan Kratochvil
2015-06-16  9:42 ` [PATCH 3/5] Update how find_separate_debug_file handles CANON_DIR argument Gary Benson
2015-07-01 11:13   ` Pedro Alves
2015-06-16  9:48 ` [PATCH 4/5] Add "target:" filename handling to find_separate_debug_file Gary Benson
2015-07-01 13:35   ` Pedro Alves
2015-07-23 14:33     ` Gary Benson
2015-07-24 10:28       ` Gary Benson
2015-07-24 11:54         ` Gary Benson [this message]
2015-07-25 18:15   ` Jan Kratochvil
2015-06-16  9:50 ` [PATCH 5/5] Also look for debug files in gdb_sysroot Gary Benson
2015-07-01 13:45   ` Pedro Alves
2015-06-23  8:44 ` [PING][PATCH 0/5] Separate debugfile improvements Gary Benson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150724115443.GA2608@blade.nx \
    --to=gbenson@redhat.com \
    --cc=cedric.buissart@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=sandra@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox