Commit Graph

4 Commits

Author SHA1 Message Date
Joel Brobecker 61baf725ec update copyright year range in GDB files
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.

gdb/ChangeLog:

        Update copyright year range in all GDB files.
2017-01-01 10:52:34 +04:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Sandra Loosemore 0588c79688 Check for readline support in gdb.base/history-duplicates.exp.
2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.base/history-duplicates.exp: Skip if no readline support.
2015-12-14 15:22:12 -08:00
Patrick Palka fc637f04c7 Add option to remove duplicate command history entries
This patch implements the new option "history remove-duplicates", which
controls the removal of duplicate history entries ("off" by default).

The motivation for this option is to be able to reduce the prevalence of
basic commands such as "up" and "down" in the history file.  These
common commands crowd out more unique commands in the history file (when
the history file has a fixed size), and they make navigation of the
history file via ^P, ^N and ^R more inconvenient.

The option takes an integer denoting the number of history entries to
look back at for a history entry that is a duplicate of the latest one.
"history remove-duplicates 1" is equivalent to bash's ignoredups option,
and "history remove-duplicates unlimited" is equivalent to bash's
erasedups option.

[ I decided to go with this integer approach instead of a tri-state enum
  because it's slightly more flexible and seemingly more intuitive than
  leave/erase/ignore.  ]

gdb/ChangeLog:

	* NEWS: Mention the new option "history remove-duplicates".
	* top.c (history_remove_duplicates): New static variable.
	(show_history_remove_duplicates): New static function.
	(gdb_add_history): Conditionally remove duplicate history
	entries.
	(init_main): Add "history remove-duplicates" option.

gdb/doc/ChangeLog:

	* gdb.texinfo (Command History): Document the new option
	"history remove-duplicates".

gdb/testsuite/ChangeLog:

	* gdb.base/history-duplicates.exp: New test.
2015-06-26 11:05:56 -04:00