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 1/2] Provide $ddir substitution for --with-auto-load-safe-path


On Fri, 11 May 2012 21:38:01 +0200, Joel Brobecker wrote:
> I proposing we ditch safe-path entirely, and merge it with
> scripts-directory. What good is it to have a directory in
> scripts-directory if it's not in safe-path at the same time?

Such case is not useful.  But I find useful to have directory in safe-path but
not in scripts-directory:

Fedora config:
              --with-auto-load-dir='$ddir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}'                                             \
        --with-auto-load-safe-path='$ddir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}:/usr/lib/debug:%{_root_bindir}/mono-gdb.py'  \

a bit offtopic #1:
mono-gdb.py is just a workaround of packaging bug:
	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=815501

a bit offtopic #2:
debug-file-directory is used by GDB implicitly as if it is in
scripts-directory (see auto_load_objfile_script, not by me).  Maybe we could
have introduced $debugdir substitution instead and make it a part of default
--with-auto-load-safe-path.  So far I find debug-file-directory (and the
separate debug info feature) to be distro specific enough it may require such
specific configuration of --with-auto-load-safe-path.


But with separate --with-auto-load-safe-path one can permit loading .gdbinit
from GCC or Emacs build directory:
	--with-auto-load-safe-path=$ddir/auto-load:~/src/gcc:~/src/emacs

If you unify these two settings it will try to load scripts for arbitrary
inferiors also from ~/src/gcc and from ~/src/emacs.  Which should be safe - as
you declared these directories safe - but I find it a bit mess.  Not sure if it
is simplification or complication.


Thanks,
Jan


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