Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org, Pedro Alves <palves@redhat.com>,
		Sandra Loosemore <sandra@codesourcery.com>,
	Paul_Koning@Dell.com, 	Jan Kratochvil <jan.kratochvil@redhat.com>,
	Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH 4/5] Use TARGET_FILENAME_PREFIX as the system root in some cases
Date: Tue, 28 Jul 2015 17:35:00 -0000	[thread overview]
Message-ID: <001a11381844e0dffe051bf2e570@google.com> (raw)

Gary Benson writes:
  > This commit updates solib_find_1 to use TARGET_FILENAME_PREFIX as the
  > system root if auto-target-prefix is enabled and gdb_sysroot is empty
  > and the target filesystem is not the local filesystem.
  >
  > gdb/ChangeLog:
  >
  > 	* solib.c (auto_target_prefix): New static variable.
  > 	(solib_find_1): Use TARGET_FILENAME_PREFIX as sysroot
  > 	in some cases.
  > 	(show_auto_target_prefix): New function.
  > 	(_initialize_solib): New "set/show auto-target-prefix"
  > 	commands.
  > 	* NEWS: Mention that GDB will use "target:" as the system
  > 	root in some cases.  Mention new "set/show auto-target-prefix"
  > 	commands.
  >
  > gdb/doc/ChangeLog:
  >
  > 	* gdb.texinfo (Commands to Specify Files): Document the
  > 	"set/show auto-target-prefix" commands.

Hi.

Still not sure whether the subtlety between these two will trip people up.

$ gdb
(gdb) file a.out
(gdb) target remote :9999
# no "target:" prefix (=no files transferred)

$ gdb
(gdb) target remote :9999
# "target:" prefix, files transferred

One thing that comes to mind is that there's no indication/warning
here of the potential massive responsiveness hit people may take
if they turn this feature on, plus an explanation of what's going
on, or how they can do things differently to avoid it.

If, after doing:

(gdb) target remote :9999

the user was first prompted with something like:

"Warning: I have no way to find files with debug info locally,
and auto-target-prefix is set to "on",
so I will try to fetch these files from the target.
This may take time.  If you want to avoid having me try to transfer
files from the target, you can do the following:
blah blah blah
Are you sure you want to continue?"
[suitably cleaned up, I didn't want to spend any time wordsmithing that]

then that may be sufficient.  What do others think?

I agree that we should get this resolved for 7.10 though.


             reply	other threads:[~2015-07-28 17:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 17:35 Doug Evans [this message]
2015-07-28 20:02 ` Sandra Loosemore
2015-07-29 10:30   ` Gary Benson
2015-08-04 16:09 ` Joel Brobecker
  -- strict thread matches above, loose matches on Subject: below --
2015-07-28 15:36 [PATCH 0/5] Change how "target:" gets into filenames Gary Benson
2015-07-28 15:36 ` [PATCH 4/5] Use TARGET_FILENAME_PREFIX as the system root in some cases Gary Benson
2015-07-28 15:40   ` Eli Zaretskii

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=001a11381844e0dffe051bf2e570@google.com \
    --to=dje@google.com \
    --cc=Paul_Koning@Dell.com \
    --cc=brobecker@adacore.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --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