This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove output_command_const


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

commit 122b53ea6a99c8811fb9cb84869b949b1ac55b22
Author: Tom Tromey <tom@tromey.com>
Date:   Mon May 21 13:28:16 2018 -0600

    Remove output_command_const
    
    I happened to notice that output_command_const still exists, but is
    not needed any more -- commands are always const-correct now.  This
    patch removes this leftover.
    
    2018-05-21  Tom Tromey  <tom@tromey.com>
    
    	* printcmd.c (output_command): Remove.
    	(output_command_const): Rename to output_command.
    	* valprint.h (output_command): Rename from output_command_const.
    	* tracepoint.c (trace_dump_actions): Call output_command.

Diff:
---
 gdb/ChangeLog    |  7 +++++++
 gdb/printcmd.c   | 10 +---------
 gdb/tracepoint.c |  2 +-
 gdb/valprint.h   |  2 +-
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 10a054f..82e249f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2018-05-21  Tom Tromey  <tom@tromey.com>
 
+	* printcmd.c (output_command): Remove.
+	(output_command_const): Rename to output_command.
+	* valprint.h (output_command): Rename from output_command_const.
+	* tracepoint.c (trace_dump_actions): Call output_command.
+
+2018-05-21  Tom Tromey  <tom@tromey.com>
+
 	* mi/mi-cmd-catch.c (mi_cmd_catch_assert)
 	(mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
 	* ada-lang.h (create_ada_exception_catchpoint): Update.
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 4696373..0dfea34 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1221,16 +1221,8 @@ call_command (const char *exp, int from_tty)
 
 /* Implementation of the "output" command.  */
 
-static void
-output_command (const char *exp, int from_tty)
-{
-  output_command_const (exp, from_tty);
-}
-
-/* Like output_command, but takes a const string as argument.  */
-
 void
-output_command_const (const char *exp, int from_tty)
+output_command (const char *exp, int from_tty)
 {
   char format = 0;
   struct value *val;
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 9261fe2..369f075 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2713,7 +2713,7 @@ trace_dump_actions (struct command_line *action,
 			}
 
 		      printf_filtered ("%s = ", exp);
-		      output_command_const (exp, from_tty);
+		      output_command (exp, from_tty);
 		      printf_filtered ("\n");
 		    }
 		  action_exp = next_comma;
diff --git a/gdb/valprint.h b/gdb/valprint.h
index f005c31..1f62039 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -210,7 +210,7 @@ extern void generic_printstr (struct ui_file *stream, struct type *type,
    arguments passed to all command implementations, except ARGS is
    const.  */
 
-extern void output_command_const (const char *args, int from_tty);
+extern void output_command (const char *args, int from_tty);
 
 extern int val_print_scalar_type_p (struct type *type);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]