diff options
author | Pedro Alves <palves@redhat.com> | 2013-07-01 11:22:12 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-07-01 11:22:12 +0000 |
commit | 50dd979345279716cd38d11aa3b175f09b8adbdd (patch) | |
tree | 9b637990a0dc34dcd3a0a74b459148c7898c0fef /gdb/ChangeLog | |
parent | bc7dea8de974648cd4e38d154abcca6879e630cc (diff) | |
download | gdb-50dd979345279716cd38d11aa3b175f09b8adbdd.zip gdb-50dd979345279716cd38d11aa3b175f09b8adbdd.tar.gz gdb-50dd979345279716cd38d11aa3b175f09b8adbdd.tar.bz2 |
Constify main.c:get_init_files.
A following patch will want to make the "gdbinit" global array const.
As usual, that forces in a cascading series of const additions. This
patch preemptively does those. I went all the way up to constifying
catch_command_errors, but then that would require constifying
execute_command as well (which is a much more significant effort). So
as stop point, I found the cleanest would be to add a variant of
catch_command_errors that takes const args, and use that in the few
spots that needed it due to the the get_init_files constification.
gdb/
2013-07-01 Pedro Alves <palves@redhat.com>
* cli/cli-cmds.c (source_script): Make 'file' parameter const.
* cli/cli-cmds.h (source_script): Likewise.
* exceptions.c (catch_command_errors_const): New function.
* exceptions.h (catch_command_errors_const): Declare.
* main.c (get_init_files): Make parameters const, and adjust.
(captured_main): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const. Adjust to use
catch_command_errors_const.
(print_gdb_help): Make 'system_gdbinit', 'home_gdbinit' and
'local_gdbinit' locals const.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7292d8b..7edc65a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,18 @@ 2013-07-01 Pedro Alves <palves@redhat.com> + * cli/cli-cmds.c (source_script): Make 'file' parameter const. + * cli/cli-cmds.h (source_script): Likewise. + * exceptions.c (catch_command_errors_const): New function. + * exceptions.h (catch_command_errors_const): Declare. + * main.c (get_init_files): Make parameters const, and adjust. + (captured_main): Make 'system_gdbinit', 'home_gdbinit' and + 'local_gdbinit' locals const. Adjust to use + catch_command_errors_const. + (print_gdb_help): Make 'system_gdbinit', 'home_gdbinit' and + 'local_gdbinit' locals const. + +2013-07-01 Pedro Alves <palves@redhat.com> + * defs.h: Don't check HAVE_UNISTD_H before including <unistd.h>. (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete. * tracepoint.c: Don't check HAVE_UNISTD_H before including |