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: Tom Tromey <tromey@redhat.com>, Eli Zaretskii <eliz@gnu.org>,
	       dje@google.com, gdb-patches@sourceware.org
Subject: Re: [patch] New set auto-load-local-gdbinit + disable it by default
Date: Wed, 18 Jan 2012 19:38:00 -0000	[thread overview]
Message-ID: <20120118191846.GA21957@host2.jankratochvil.net> (raw)
In-Reply-To: <20120118035927.GY31383@adacore.com>

On Wed, 18 Jan 2012 04:59:27 +0100, Joel Brobecker wrote:
>     I would like to propose the following, however, to help the users
>     who want to continue relying on it. I am happy to implement it
>     if necessary:
> 
>         Provide a new command that would read the .gdbinit file in
>         the current working directory if present, and do nothing
>         otherwise.  I would like to provide options that select
>         between loading silently, and loading with a warning first,
>         and why not, asking before loading.
> 
>         The idea is that the user who would like to preserve
>         the old behavior can put that command in his $HOME/.gdbinit
>         file.

The goal was you can do either
	echo 'set auto-load-local-gdbinit on' >>~/.gdbinit
or
	echo 'set auto-load-local-gdbinit on' >>/etc/gdbinit
and you get the former behavior.

Did you still prefer the command you propose?


>   . To me, it is extremely important that system-gdbinit is still
>     automatically loaded.

This patch/discussion affect neither /etc/gdbinit nor ~/.gdbinit in any way.


>     It should be considered as trusted,

Yes, they are.


>   . About the auto-loading of Python code: I think that the cost
>     of removing the auto-loading, even if it is only for non-trusted
>     directories, would be too high. I would prefer if it discussed
>     this separately after the .gdbinit issue has been resolved.

After the discussion my current plan is:
 * change .gdbinit to PROGRAM-gdb.rc (like -gdb.py),
   rename FSF GDB src/gdb/.gdbinit to src/gdb/gdb-gdb.rc,
   delete FSF GDB src/testsuite/.gdbinit ("set height 400" only, why?)
   This will fix the annoying problems of running gdb for other programs in
   the src/gdb/ directory.
 * deprecate .gdbinit
 * propose less intrusive gdb-gdb.rc, this sure affects only GDB developers,
   like do not change the outer prompt to "(top-gdb)"; I do not mind much.
 * in a second patch series deal with security, propose some "-safe" option,
   PROGRAM-gdb.rc is more visible than .gdbinit, it has the same security
   issue like PROGRAM-gdb.py and we have to deal with -gdb.py already anyway.


Thanks,
Jan


  reply	other threads:[~2012-01-18 19:19 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 10:16 Jan Kratochvil
2012-01-17 12:34 ` Eli Zaretskii
2012-01-17 13:42   ` Joel Brobecker
2012-01-17 14:49     ` [patch 7.4] Deprecate local .gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-17 16:22       ` Doug Evans
2012-01-17 20:22   ` [patch] New set auto-load-local-gdbinit + disable it by default Tom Tromey
2012-01-17 16:15 ` Doug Evans
2012-01-17 16:34   ` Jan Kratochvil
2012-01-17 16:48     ` Doug Evans
2012-01-17 17:27       ` Jan Kratochvil
2012-01-17 17:33         ` Doug Evans
2012-01-17 17:55           ` Jan Kratochvil
2012-01-17 18:29             ` Eli Zaretskii
2012-01-17 18:35               ` Jan Kratochvil
2012-01-17 19:54                 ` Tom Tromey
2012-01-17 18:31             ` Doug Evans
2012-01-17 18:44               ` Jan Kratochvil
2012-01-17 19:12                 ` Doug Evans
2012-01-17 19:20                   ` Jan Kratochvil
2012-01-17 19:55               ` Tom Tromey
2012-01-17 20:24                 ` Pedro Alves
2012-01-17 20:26                   ` Tom Tromey
2012-01-17 20:35                   ` Jan Kratochvil
2012-01-17 20:56                     ` Pedro Alves
2012-01-17 19:30           ` Matt Rice
2012-01-17 19:37             ` Jan Kratochvil
2012-01-17 20:26             ` Tom Tromey
2012-01-17 18:00     ` Eli Zaretskii
2012-01-17 18:28       ` Jan Kratochvil
2012-01-17 18:43         ` Eli Zaretskii
2012-01-17 19:02           ` Jan Kratochvil
2012-01-17 20:29         ` Tom Tromey
2012-01-17 20:49           ` Jan Kratochvil
2012-01-17 20:54             ` Doug Evans
2012-01-17 21:10             ` Tom Tromey
2012-01-17 21:13           ` Eli Zaretskii
2012-01-17 21:14             ` Tom Tromey
2012-01-18  4:26               ` Joel Brobecker
2012-01-18 19:38                 ` Jan Kratochvil [this message]
2012-01-18 20:01                   ` Doug Evans
2012-01-19  6:30                   ` Joel Brobecker
2012-01-19 12:57                     ` [commit] rm gdb/testsuite/.gdbinit [Re: [patch] New set auto-load-local-gdbinit + disable it by default] Jan Kratochvil
2012-01-19 21:07                   ` [patch] New set auto-load-local-gdbinit + disable it by default Tom Tromey
2012-01-19 21:47                     ` Jan Kratochvil
2012-01-19 21:53                       ` Doug Evans
2012-01-20  4:11                         ` Jan Kratochvil
2012-01-19 21:06                 ` Tom Tromey
2012-01-17 22:16             ` Doug Evans
2012-01-18  3:05               ` Tom Tromey
2012-01-17 16:26 ` Matt Rice
2012-01-17 16:57   ` Doug Evans
2012-01-17 20:09 ` Tom Tromey
2012-01-24  0:33 ` Stan Shebs
2012-01-24 15:54   ` 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=20120118191846.GA21957@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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