This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog exceptions.c exceptions.h ma ...
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: Mon, 01 Jul 2013 11:22:12 +0000
- Subject: src/gdb ChangeLog exceptions.c exceptions.h ma ...
CVSROOT: /cvs/src
Module name: src
Changes by: palves@sourceware.org 2013-07-01 11:22:12
Modified files:
gdb : ChangeLog exceptions.c exceptions.h main.c
gdb/cli : cli-cmds.c cli-cmds.h
Log message:
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.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15770&r2=1.15771
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/exceptions.c.diff?cvsroot=src&r1=1.54&r2=1.55
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/exceptions.h.diff?cvsroot=src&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/main.c.diff?cvsroot=src&r1=1.125&r2=1.126
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cli/cli-cmds.c.diff?cvsroot=src&r1=1.156&r2=1.157
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cli/cli-cmds.h.diff?cvsroot=src&r1=1.23&r2=1.24