From: Tom Tromey Date: Sun, 10 Sep 2017 03:39:18 +0000 (-0600) Subject: Constify commands in cli-dump.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d0ac1068babfe8800607b17ddb2f31189bdb334;p=binutils-gdb.git Constify commands in cli-dump.c gdb/ChangeLog 2017-09-27 Tom Tromey * cli/cli-dump.c (dump_memory_command, dump_value_command) (dump_srec_memory, dump_srec_value, dump_ihex_memory) (dump_ihex_value, dump_verilog_memory, dump_verilog_value) (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory) (dump_binary_value, append_binary_memory, append_binary_value): Constify. (struct dump_context) : Constify. (add_dump_command): Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f40b3c2d1e3..f65691d7b06 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2017-09-27 Tom Tromey + + * cli/cli-dump.c (dump_memory_command, dump_value_command) + (dump_srec_memory, dump_srec_value, dump_ihex_memory) + (dump_ihex_value, dump_verilog_memory, dump_verilog_value) + (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory) + (dump_binary_value, append_binary_memory, append_binary_value): + Constify. + (struct dump_context) : Constify. + (add_dump_command): Update. + 2017-09-27 Tom Tromey * cli/cli-cmds.c (show_version, show_configuration) diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 550548a2c40..f4ea2d7342b 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -215,7 +215,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format) } static void -dump_memory_command (char *cmd, const char *mode) +dump_memory_command (const char *cmd, const char *mode) { dump_memory_to_file (cmd, mode, "binary"); } @@ -260,86 +260,86 @@ dump_value_to_file (const char *cmd, const char *mode, const char *file_format) } static void -dump_value_command (char *cmd, const char *mode) +dump_value_command (const char *cmd, const char *mode) { dump_value_to_file (cmd, mode, "binary"); } static void -dump_srec_memory (char *args, int from_tty) +dump_srec_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_WB, "srec"); } static void -dump_srec_value (char *args, int from_tty) +dump_srec_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_WB, "srec"); } static void -dump_ihex_memory (char *args, int from_tty) +dump_ihex_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_WB, "ihex"); } static void -dump_ihex_value (char *args, int from_tty) +dump_ihex_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_WB, "ihex"); } static void -dump_verilog_memory (char *args, int from_tty) +dump_verilog_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_WB, "verilog"); } static void -dump_verilog_value (char *args, int from_tty) +dump_verilog_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_WB, "verilog"); } static void -dump_tekhex_memory (char *args, int from_tty) +dump_tekhex_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_WB, "tekhex"); } static void -dump_tekhex_value (char *args, int from_tty) +dump_tekhex_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_WB, "tekhex"); } static void -dump_binary_memory (char *args, int from_tty) +dump_binary_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_WB, "binary"); } static void -dump_binary_value (char *args, int from_tty) +dump_binary_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_WB, "binary"); } static void -append_binary_memory (char *args, int from_tty) +append_binary_memory (const char *args, int from_tty) { dump_memory_to_file (args, FOPEN_AB, "binary"); } static void -append_binary_value (char *args, int from_tty) +append_binary_value (const char *args, int from_tty) { dump_value_to_file (args, FOPEN_AB, "binary"); } struct dump_context { - void (*func) (char *cmd, const char *mode); + void (*func) (const char *cmd, const char *mode); const char *mode; }; @@ -353,7 +353,7 @@ call_dump_func (struct cmd_list_element *c, char *args, int from_tty) static void add_dump_command (const char *name, - void (*func) (char *args, const char *mode), + void (*func) (const char *args, const char *mode), const char *descr) {