aboutsummaryrefslogtreecommitdiff
path: root/gdb/go32-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-10-13 22:58:21 -0600
committerTom Tromey <tom@tromey.com>2017-11-07 13:59:09 -0700
commit5fed81ff351121887a93b5b57caebb86667cbbd2 (patch)
tree571f96134b9dd45b2778469c750a59ccc62bb624 /gdb/go32-nat.c
parent1d12d88f186fe1ae66deccf877b5509c506c4d39 (diff)
downloadgdb-5fed81ff351121887a93b5b57caebb86667cbbd2.zip
gdb-5fed81ff351121887a93b5b57caebb86667cbbd2.tar.gz
gdb-5fed81ff351121887a93b5b57caebb86667cbbd2.tar.bz2
Remove cmd_cfunc_ftype
This removes cmd_cfunc_ftype and the non-const overload of add_cmd; then fixes up the fallout. For the most part this patch is straightforward. There are a few files (go32-nat.c, windows-nat.c, and gnu-nat.c) that I could not compile; so I made a best effort there. gdb/ChangeLog 2017-11-07 Tom Tromey <tom@tromey.com> * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt) (go32_pde, go32_pte, go32_pte_for_address): Constify. * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd) (set_thread_default_pause_cmd, set_thread_default_run_cmd) (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd) (parse_int_arg, show_thread_default_detach_sc_cmd) (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd) (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd) (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd) (show_task_pause_cmd, set_task_detach_sc_cmd) (show_task_detach_sc_cmd, set_task_exc_port_cmd) (set_noninvasive_cmd, set_thread_pause_cmd) (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd) (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd) (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify. * windows-nat.c (display_selectors): Constify. * cli/cli-decode.h (struct cmd_list_element) <function>: Remove non-const "cfunc". * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload. (cmd_cfunc_eq): Likewise. (struct cmd_list_element): Likewise. (do_cfunc): Remove. (cli_user_command_p): Update. * command.h (add_cmd): Remove non-const overload. (cmd_cfunc_ftype): Remove typedef. (cmd_cfunc_eq): Remove non-const overload. * value.c (show_values): Constify. * thread.c (thread_apply_all_command): Constify. * symfile.c (load_command): Constify. * source.c (directory_command): Constify. * maint.c (maintenance_internal_error) (maintenance_demangler_warning, maintenance_space_display) (maintenance_print_architecture, maintenance_translate_address) (maintenance_info_selftests, maintenance_internal_warning): Constify. * breakpoint.c (disable_trace_command, enable_trace_command): Constify. * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir): Constify. (add_auto_load_safe_path): Constify. * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify. * top.h (show_commands): Constify. * linux-thread-db.c (info_auto_load_libthread_db): Constify. * sparc64-tdep.c (adi_examine_command): Constify. (adi_assign_command): Constify.
Diffstat (limited to 'gdb/go32-nat.c')
-rw-r--r--gdb/go32-nat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 6abd734..5bf262f 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -1061,7 +1061,7 @@ print_mem (unsigned long datum, const char *header, int in_pages_p)
/* Display assorted information about the underlying OS. */
static void
-go32_sysinfo (char *arg, int from_tty)
+go32_sysinfo (const char *arg, int from_tty)
{
static const char test_pattern[] =
"deadbeafdeadbeafdeadbeafdeadbeafdeadbeaf"
@@ -1658,7 +1658,7 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force)
}
static void
-go32_sldt (char *arg, int from_tty)
+go32_sldt (const char *arg, int from_tty)
{
struct dtr_reg gdtr;
unsigned short ldtr = 0;
@@ -1731,7 +1731,7 @@ go32_sldt (char *arg, int from_tty)
}
static void
-go32_sgdt (char *arg, int from_tty)
+go32_sgdt (const char *arg, int from_tty)
{
struct dtr_reg gdtr;
long gdt_entry = -1L;
@@ -1772,7 +1772,7 @@ go32_sgdt (char *arg, int from_tty)
}
static void
-go32_sidt (char *arg, int from_tty)
+go32_sidt (const char *arg, int from_tty)
{
struct dtr_reg idtr;
long idt_entry = -1L;
@@ -1944,7 +1944,7 @@ display_ptable_entry (unsigned long entry, int is_dir, int force, unsigned off)
}
static void
-go32_pde (char *arg, int from_tty)
+go32_pde (const char *arg, int from_tty)
{
long pde_idx = -1, i;
@@ -1994,7 +1994,7 @@ display_page_table (long n, int force)
}
static void
-go32_pte (char *arg, int from_tty)
+go32_pte (const char *arg, int from_tty)
{
long pde_idx = -1L, i;
@@ -2021,7 +2021,7 @@ go32_pte (char *arg, int from_tty)
}
static void
-go32_pte_for_address (char *arg, int from_tty)
+go32_pte_for_address (const char *arg, int from_tty)
{
CORE_ADDR addr = 0, i;