This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Constify some commands in printcmd.c
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Sep 2017 14:58:58 -0000
- Subject: [binutils-gdb] Constify some commands in printcmd.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7776370010db4d85a89a0dfde391aa9170ac1bbe
commit 7776370010db4d85a89a0dfde391aa9170ac1bbe
Author: Tom Tromey <tom@tromey.com>
Date: Tue Sep 12 21:30:50 2017 -0600
Constify some commands in printcmd.c
gdb/ChangeLog
2017-09-27 Tom Tromey <tom@tromey.com>
* printcmd.c (map_display_numbers, undisplay_command)
(enable_disable_display_command, enable_display_command)
(disable_display_command): Constify.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/printcmd.c | 10 +++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1a83a06..151d717 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2017-09-27 Tom Tromey <tom@tromey.com>
+ * printcmd.c (map_display_numbers, undisplay_command)
+ (enable_disable_display_command, enable_display_command)
+ (disable_display_command): Constify.
+
+2017-09-27 Tom Tromey <tom@tromey.com>
+
* breakpoint.h (delete_command): Don't declare.
* breakpoint.c (delete_command, enable_once_command)
(enable_count_command, enable_delete_command, breakpoint_1)
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 033d687..de1f76c 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1795,7 +1795,7 @@ delete_display (struct display *display)
ARGS. DATA is passed unmodified to FUNCTION. */
static void
-map_display_numbers (char *args,
+map_display_numbers (const char *args,
void (*function) (struct display *,
void *),
void *data)
@@ -1840,7 +1840,7 @@ do_delete_display (struct display *d, void *data)
/* "undisplay" command. */
static void
-undisplay_command (char *args, int from_tty)
+undisplay_command (const char *args, int from_tty)
{
if (args == NULL)
{
@@ -2085,7 +2085,7 @@ do_enable_disable_display (struct display *d, void *data)
commands. ENABLE decides what to do. */
static void
-enable_disable_display_command (char *args, int from_tty, int enable)
+enable_disable_display_command (const char *args, int from_tty, int enable)
{
if (args == NULL)
{
@@ -2102,7 +2102,7 @@ enable_disable_display_command (char *args, int from_tty, int enable)
/* The "enable display" command. */
static void
-enable_display_command (char *args, int from_tty)
+enable_display_command (const char *args, int from_tty)
{
enable_disable_display_command (args, from_tty, 1);
}
@@ -2110,7 +2110,7 @@ enable_display_command (char *args, int from_tty)
/* The "disable display" command. */
static void
-disable_display_command (char *args, int from_tty)
+disable_display_command (const char *args, int from_tty)
{
enable_disable_display_command (args, from_tty, 0);
}