This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] prevent the "load" command from repeating
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 3 Jan 2011 11:54:17 +0400
- Subject: [PATCH] prevent the "load" command from repeating
This fixes a discrepancy I noticed while reading the code and manual
for the `load' command...
This makes sure that the `load' command does not repeat when the user
presses Return again, as documented in the GDB User's Manual.
gdb/ChangeLog:
* symfile.c (find_sym_fns): Add call to dont_repeat.
Tested on x86_64-linux. Checked in.
---
gdb/ChangeLog | 4 ++++
gdb/symfile.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d984d2..08b2b09 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-03 Joel Brobecker <brobecker@adacore.com>
+
+ * symfile.c (find_sym_fns): Add call to dont_repeat.
+
2011-01-01 Joel Brobecker <brobecker@adacore.com>
Copyright year update in most files (performed by copyright.sh).
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d333189..260aff3 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1742,6 +1742,8 @@ find_sym_fns (bfd *abfd)
static void
load_command (char *arg, int from_tty)
{
+ dont_repeat ();
+
/* The user might be reloading because the binary has changed. Take
this opportunity to check. */
reopen_exec_file ();
--
1.7.1