From 9cbe5fff2b47da85dbc628bdc8c6a85d5344749a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 27 Mar 2013 14:14:26 -0600 Subject: constify to_load This makes the argument to the target_ops to_load method "const", and fixes up the fallout. Tested by rebuilding all the affected files. 2014-06-26 Tom Tromey * defs.h (generic_load): Update. * m32r-rom.c (m32r_load_gen): Make "filename" const. * monitor.c (monitor_load): Make "args" const. * remote-m32r-sdi.c (m32r_load): Make "args" const. * remote-mips.c (mips_load_srec, pmon_load_fast): Make "args" const. (mips_load): Make "file" const. * remote-sim.c (gdbsim_load): Make "args" const. * remote.c (remote_load): Make "name" const. * symfile.c (generic_load): Make "args" const. * target-delegates.c: Rebuild. * target.c (target_load): Make "arg" const. (debug_to_load): Make "args" const. * target.h (struct target_ops) : Make parameter const. (target_load): Update. --- gdb/target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index f384ed0..ece59e6 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -169,7 +169,7 @@ static void debug_to_terminal_save_ours (struct target_ops *self); static void debug_to_terminal_ours (struct target_ops *self); -static void debug_to_load (struct target_ops *self, char *, int); +static void debug_to_load (struct target_ops *self, const char *, int); static int debug_to_can_run (struct target_ops *self); @@ -476,7 +476,7 @@ target_kill (void) } void -target_load (char *arg, int from_tty) +target_load (const char *arg, int from_tty) { target_dcache_invalidate (); (*current_target.to_load) (¤t_target, arg, from_tty); @@ -3876,7 +3876,7 @@ debug_to_terminal_info (struct target_ops *self, } static void -debug_to_load (struct target_ops *self, char *args, int from_tty) +debug_to_load (struct target_ops *self, const char *args, int from_tty) { debug_target.to_load (&debug_target, args, from_tty); -- cgit v1.1