From 69150c3d5af696f56fac619ceb0756319ca5074b Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 19 Sep 2013 12:44:46 +0000 Subject: Mostly code cleanup: Constification. gdb/ 2013-09-19 Jan Kratochvil Constification. * main.c (captured_main): Replace catch_command_errors by catch_command_errors_const. Twice. * symfile.c (symbol_file_add_main_1): Make args parameter const. (symbol_file_add): Make name parameter const. (symbol_file_add_main, symbol_file_add_main_1): Make args parameter const. (symfile_bfd_open): Make name parameter const, rename it to cname. Add variable name. Change their usage accordingly. * symfile.h (symbol_file_add, symfile_bfd_open): Make first parameter const. (symbol_file_add_main): Make args parameter const. --- gdb/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/main.c') diff --git a/gdb/main.c b/gdb/main.c index 3e0e1fe..7ff9183 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -957,8 +957,8 @@ captured_main (void *data) catch_command_errors returns non-zero on success! */ if (catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL)) - catch_command_errors (symbol_file_add_main, symarg, - !batch_flag, RETURN_MASK_ALL); + catch_command_errors_const (symbol_file_add_main, symarg, + !batch_flag, RETURN_MASK_ALL); } else { @@ -966,8 +966,8 @@ captured_main (void *data) catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL); if (symarg != NULL) - catch_command_errors (symbol_file_add_main, symarg, - !batch_flag, RETURN_MASK_ALL); + catch_command_errors_const (symbol_file_add_main, symarg, + !batch_flag, RETURN_MASK_ALL); } if (corearg && pidarg) -- cgit v1.1