Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path
Date: Fri, 11 May 2012 19:54:00 -0000	[thread overview]
Message-ID: <20120511195325.GA23742@host2.jankratochvil.net> (raw)
In-Reply-To: <20120511193801.GE5886@adacore.com>

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


  reply	other threads:[~2012-05-11 19:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 15:47 Jan Kratochvil
2012-05-09 17:43 ` Eli Zaretskii
2012-05-09 18:17   ` [obv doc] Fix too wide @smallexample [Re: [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path] Jan Kratochvil
2012-05-09 18:48     ` Eli Zaretskii
2012-05-09 18:59   ` [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path Jan Kratochvil
2012-05-09 20:08     ` Joel Brobecker
2012-05-11 16:46       ` Jan Kratochvil
2012-05-11 17:29         ` Joel Brobecker
2012-05-11 18:15       ` Jan Kratochvil
2012-05-11 18:13 ` Pedro Alves
2012-05-11 18:17   ` Jan Kratochvil
2012-05-11 18:59     ` Pedro Alves
2012-05-11 19:05       ` Jan Kratochvil
2012-05-11 19:15         ` Pedro Alves
2012-05-11 19:34           ` Jan Kratochvil
2012-05-11 20:28             ` [patch] Cosmetic fix 'show auto-load safe-path' for ":" [Re: [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path] Jan Kratochvil
2012-05-18 17:45               ` [commit] [patch] Cosmetic fix 'show auto-load safe-path' for ":" Jan Kratochvil
2012-05-11 18:19   ` [patch 1/2] Provide $ddir substitution for --with-auto-load-safe-path Joel Brobecker
2012-05-11 18:30     ` Jan Kratochvil
2012-05-11 19:38       ` Joel Brobecker
2012-05-11 19:54         ` Jan Kratochvil [this message]
2012-05-14 14:50           ` Joel Brobecker
2012-05-14 14:57             ` Jan Kratochvil

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=20120511195325.GA23742@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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