aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-27 14:14:26 -0600
committerTom Tromey <tromey@redhat.com>2014-06-26 09:14:14 -0600
commit9cbe5fff2b47da85dbc628bdc8c6a85d5344749a (patch)
treea3ee9c16f6b4726d51239c62f40793a810baf0c8 /gdb/target.h
parent34a68019ccc3879801a291a00bad5bc10558bf5d (diff)
downloadgdb-9cbe5fff2b47da85dbc628bdc8c6a85d5344749a.zip
gdb-9cbe5fff2b47da85dbc628bdc8c6a85d5344749a.tar.gz
gdb-9cbe5fff2b47da85dbc628bdc8c6a85d5344749a.tar.bz2
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 <tromey@redhat.com> * 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) <to_load>: Make parameter const. (target_load): Update.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 96d5cb1..a0a0d30 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -499,7 +499,7 @@ struct target_ops
TARGET_DEFAULT_FUNC (default_terminal_info);
void (*to_kill) (struct target_ops *)
TARGET_DEFAULT_NORETURN (noprocess ());
- void (*to_load) (struct target_ops *, char *, int)
+ void (*to_load) (struct target_ops *, const char *, int)
TARGET_DEFAULT_NORETURN (tcomplain ());
/* Start an inferior process and set inferior_ptid to its pid.
EXEC_FILE is the file to run.
@@ -1423,7 +1423,7 @@ extern void target_kill (void);
sections. The target may define switches, or other non-switch
arguments, as it pleases. */
-extern void target_load (char *arg, int from_tty);
+extern void target_load (const char *arg, int from_tty);
/* Some targets (such as ttrace-based HPUX) don't allow us to request
notification of inferior events such as fork and vork immediately