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] Use TARGET_FILENAME_PREFIX as the system root in some cases


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.


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