Bug 23664

Summary: add "save history" command
Product: gdb Reporter: Tom Tromey <tromey>
Component: cliAssignee: Tom Tromey <tromey>
Status: RESOLVED FIXED    
Severity: normal CC: ssbssa
Priority: P2    
Version: HEAD   
Target Milestone: 18.1   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:

Description Tom Tromey 2018-09-15 18:55:42 UTC
Sometimes I'd like to be able to write out some of my
command-line history as a gdb script.
Maybe a "save history" command with parameters to control which
elements are saved.
Comment 1 Tom Tromey 2023-01-24 00:41:04 UTC
Working on a patch.
Comment 2 Hannes Domani 2024-01-10 16:43:09 UTC
Maybe a dup of PR15328?
Comment 3 Tom Tromey 2024-01-11 17:14:56 UTC
I sent a patch for "save history" but not any of the other stuff.
So I tend to think this could remain separate.
Comment 4 Sourceware Commits 2026-02-19 00:47:04 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=52279d0980ee052bb425bd4e96fd36a25c4c3e88

commit 52279d0980ee052bb425bd4e96fd36a25c4c3e88
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Jan 23 17:40:16 2023 -0700

    Add "save history" command
    
    PR cli/23664 points out that it would sometimes be convenient to
    immediately save the current history to a file.  This patch implements
    this feature.
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23664
    Reviewed-By: Eli Zaretskii <eliz@gnu.org>
    Reviewed-By: Keith Seitz <keiths@redhat.com>
Comment 5 Tom Tromey 2026-02-19 00:48:18 UTC
Fixed.