From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: mbilal <mbilal@codesourcery.com>,
gdb-patches@sourceware.org, tromey@redhat.com
Subject: Re: Fwd: [PATCH] Fix for PR gdb/15224 should "set history save on" by default
Date: Mon, 01 Apr 2013 11:34:00 -0000 [thread overview]
Message-ID: <5159707E.9090209@redhat.com> (raw)
In-Reply-To: <20130329141514.GA16671@host2.jankratochvil.net>
On 03/29/2013 02:15 PM, Jan Kratochvil wrote:
> While that could be fixed in GDB testsuite the same problem will affect any
> GDB frontend.
>
> Could you propose a patch compatible at least with existing front ends (like
> Eclipse CDT)?
The commands issued in MI sessions aren't added to the history, as when the top
level interpreter is MI, GDB doesn't use readline/history (look for add_history).
It could be argued that commands executed through "-interpreter-exec console"
should make it to the history. Then we'd have the problem that cli
commands that frontends issue because there are no MI alternatives would
appear on the history. But, we already have a solution for that -- the
"server" command/prefix
(http://sourceware.org/gdb/onlinedocs/gdb/Server-Prefix.html#Server-Prefix).
> I was thinking to just bind the default WRITE_HISTORY_P to
> whether ~/.gdbinit is being read or not.
The history's filename is also tweakable with the GDBHISTFILE
environment variable (there's HISTSIZE too; 'GDBHISTFILE= gdb' effectively
disables history load/save). Doesn't feel quite right to tie this to .gdbinit.
One possible counter argument to flipping this on would that since history
files are saved to the current directory by default, this has potential for
littering users' directories with (hidden) .gdb_history files without the
users noticing. We should at least make that fact explicit in NEWS and
perhaps make it prominent in the manual.
--
Pedro Alves
next prev parent reply other threads:[~2013-04-01 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51558CB4.8010003@codesourcery.com>
2013-03-29 16:18 ` mbilal
2013-03-29 16:28 ` Jan Kratochvil
2013-04-01 11:34 ` Pedro Alves [this message]
2013-04-01 12:41 ` Jan Kratochvil
2013-04-01 19:44 ` Pedro Alves
2013-04-02 17:10 ` Jan Kratochvil
2013-04-03 17:14 ` Pedro Alves
2013-04-03 17:50 ` 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=5159707E.9090209@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=mbilal@codesourcery.com \
--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