diff options
author | Tom Tromey <tom@tromey.com> | 2017-10-13 22:07:26 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-11-07 13:59:09 -0700 |
commit | 1d12d88f186fe1ae66deccf877b5509c506c4d39 (patch) | |
tree | 9a71354d688beaf173334cd9e31b7baed124a6f2 /gdb/darwin-nat-info.c | |
parent | 0b39b52e6e92cf6d465d48499c657fcb17a63c7f (diff) | |
download | fsf-binutils-gdb-1d12d88f186fe1ae66deccf877b5509c506c4d39.zip fsf-binutils-gdb-1d12d88f186fe1ae66deccf877b5509c506c4d39.tar.gz fsf-binutils-gdb-1d12d88f186fe1ae66deccf877b5509c506c4d39.tar.bz2 |
Constify add_info
This patch constifies add_info and updates all the info commands. The
bulk of this patch was written using a script; and then I did a manual
pass to fix up the remaining compilation errors.
I could not compile every changed file; in particular nto-procfs.c,
gnu-nat.c, and darwin-nat-info.c; but I at least tried to check the
correctness by inspection.
gdb/ChangeLog
2017-11-07 Tom Tromey <tom@tromey.com>
* frame.h (info_locals_command, info_args_command): Constify.
* auto-load.h (auto_load_info_scripts): Constify.
* inferior.h (registers_info): Constify.
* copying.c: Rebuild.
* copying.awk: Constify generated commands.
* auto-load.c (auto_load_info_scripts)
(info_auto_load_gdb_scripts): Constify.
* cli/cli-decode.c (struct cmd_list_element): Take a
cmd_const_cfunc_ftype.
* command.h (add_info): Take a cmd_const_cfunc_ftype.
* tui/tui-win.c (tui_all_windows_info): Constify.
* python/py-auto-load.c (info_auto_load_python_scripts):
Constify.
* cli/cli-cmds.c (show_command): Remove non-const overload.
* tracepoint.c (info_tvariables_command, info_scope_command):
Constify.
(info_static_tracepoint_markers_command): Constify.
* thread.c (info_threads_command): Constify.
(print_thread_info_1): Constify.
* target.c (info_target_command): Constify.
* symtab.c (info_sources_command, info_functions_command)
(info_types_command): Constify.
(info_variables_command): Remove non-const overload.
* symfile.c (info_ext_lang_command): Constify.
* stack.c (info_frame_command, info_locals_command)
(info_args_command): Constify.
(backtrace_command): Remove non-const overload.
* source.c (info_source_command, info_line_command): Constify.
* solib.c (info_sharedlibrary_command): Constify.
* skip.c (info_skip_command): Constify.
* ser-go32.c (info_serial_command): Constify.
* reverse.c (info_bookmarks_command): Constify.
* printcmd.c (info_symbol_command, info_address_command)
(info_display_command): Constify.
* osdata.c (info_osdata_command): Constify.
* objc-lang.c (info_selectors_command, info_classes_command):
Constify.
* nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
* memattr.c (info_mem_command): Constify.
* macrocmd.c (info_macro_command, info_macros_command): Constify.
* linux-fork.c (info_checkpoints_command): Constify.
* infrun.c (info_signals_command): Constify.
* inflow.c (info_terminal_command): Constify.
* inferior.c (info_inferiors_command): Constify.
(print_inferior): Constify.
* infcmd.c (info_program_command, info_all_registers_command)
(info_registers_command, info_vector_command)
(info_float_command): Constify.
(registers_info): Constify.
* gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
(info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
Constify.
* f-valprint.c (info_common_command): Constify.
* dcache.c (info_dcache_command): Constify.
(dcache_info_1): Constify.
* darwin-nat-info.c (info_mach_tasks_command)
(info_mach_task_command, info_mach_ports_command)
(info_mach_port_command, info_mach_threads_command)
(info_mach_thread_command, info_mach_regions_command)
(info_mach_regions_recurse_command, info_mach_region_command)
(info_mach_exceptions_command): Constify.
(get_task_from_args): Constify.
* cp-support.c (info_vtbl_command): Constify.
* breakpoint.c (info_watchpoints_command)
(info_tracepoints_command): Constify.
(info_breakpoints_command): Remove non-const overload.
* avr-tdep.c (avr_io_reg_read_command): Constify.
* auxv.c (info_auxv_command): Constify.
* ada-tasks.c (info_tasks_command): Constify.
(info_task): Constify.
* ada-lang.c (info_exceptions_command): Constify.
Diffstat (limited to 'gdb/darwin-nat-info.c')
-rw-r--r-- | gdb/darwin-nat-info.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c index fc9aeaa..44782bf 100644 --- a/gdb/darwin-nat-info.c +++ b/gdb/darwin-nat-info.c @@ -66,7 +66,7 @@ #define port_type_array_t mach_port_array_t static void -info_mach_tasks_command (char *args, int from_tty) +info_mach_tasks_command (const char *args, int from_tty) { int sysControl[4]; int count, index; @@ -109,7 +109,7 @@ info_mach_tasks_command (char *args, int from_tty) } static task_t -get_task_from_args (char *args) +get_task_from_args (const char *args) { task_t task; char *eptr; @@ -132,7 +132,7 @@ get_task_from_args (char *args) } static void -info_mach_task_command (char *args, int from_tty) +info_mach_task_command (const char *args, int from_tty) { union { @@ -189,7 +189,7 @@ info_mach_task_command (char *args, int from_tty) } static void -info_mach_ports_command (char *args, int from_tty) +info_mach_ports_command (const char *args, int from_tty) { port_name_array_t names; port_type_array_t types; @@ -326,7 +326,7 @@ darwin_debug_port_info (task_t task, mach_port_t port) } static void -info_mach_port_command (char *args, int from_tty) +info_mach_port_command (const char *args, int from_tty) { task_t task; mach_port_t port; @@ -338,7 +338,7 @@ info_mach_port_command (char *args, int from_tty) } static void -info_mach_threads_command (char *args, int from_tty) +info_mach_threads_command (const char *args, int from_tty) { thread_array_t threads; unsigned int thread_count; @@ -365,7 +365,7 @@ info_mach_threads_command (char *args, int from_tty) } static void -info_mach_thread_command (char *args, int from_tty) +info_mach_thread_command (const char *args, int from_tty) { union { @@ -696,7 +696,7 @@ darwin_debug_region (task_t task, mach_vm_address_t address) } static void -info_mach_regions_command (char *args, int from_tty) +info_mach_regions_command (const char *args, int from_tty) { task_t task; @@ -708,7 +708,7 @@ info_mach_regions_command (char *args, int from_tty) } static void -info_mach_regions_recurse_command (char *args, int from_tty) +info_mach_regions_recurse_command (const char *args, int from_tty) { task_t task; @@ -720,7 +720,7 @@ info_mach_regions_recurse_command (char *args, int from_tty) } static void -info_mach_region_command (char *exp, int from_tty) +info_mach_region_command (const char *exp, int from_tty) { struct value *val; mach_vm_address_t address; @@ -792,7 +792,7 @@ disp_exception (const darwin_exception_info *info) } static void -info_mach_exceptions_command (char *args, int from_tty) +info_mach_exceptions_command (const char *args, int from_tty) { int i; task_t task; |