unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59838@debbugs.gnu.org
Subject: bug#59838: 30.0.50; [PATCH] Save history in GDB session
Date: Mon, 05 Dec 2022 18:53:33 +0100	[thread overview]
Message-ID: <877cz5hh42.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <837cz593az.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Dec 2022 19:19:00 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Date: Mon, 05 Dec 2022 17:53:06 +0100
>> 
>> I'm not really an expert in gdb (and comint-mode) but it seems that 'M-x
>> gdb' does not save its history.  Here is a patch that fix this.
>
> GDB has its own history feature, activated by the GDB command "set history
> save on".  If the GDB history file is detected when "M-x gdb" starts, it
> will read the history and fill comint-input-ring with what it finds there.
> See the function 'gdb' in gdb-mi.el.
>
> So I think this is already covered, or what did I miss?

I already have this in my ~/.gdbinit:
--8<---------------cut here---------------start------------->8---
set history save on
set history size 1024
add-auto-load-safe-path /home/manuel/emacs-repo/src/.gdbinit
--8<---------------cut here---------------end--------------->8---

When debugging emacs from 'M-x gdb', gdb does create a file
"/home/manuel/emacs-repo/src/.gdb_history" but it always stays empty
even when I "quit" from the *gud-emacs* buffer.
-- 
Manuel Giraud





  reply	other threads:[~2022-12-05 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 16:53 bug#59838: 30.0.50; [PATCH] Save history in GDB session Manuel Giraud
2022-12-05 17:19 ` Eli Zaretskii
2022-12-05 17:53   ` Manuel Giraud [this message]
2022-12-05 19:35     ` Eli Zaretskii
2022-12-06 10:30       ` Manuel Giraud
2022-12-06 12:27         ` Eli Zaretskii
2022-12-06 16:23           ` Manuel Giraud
2022-12-08 10:28             ` Manuel Giraud
2022-12-09  9:02             ` Manuel Giraud
2022-12-10 13:40               ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cz5hh42.fsf@ledu-giraud.fr \
    --to=manuel@ledu-giraud.fr \
    --cc=59838@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).