summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-07-22 10:56:01 -0600
committerTom Tromey <tromey@redhat.com>2014-07-30 08:02:53 -0600
commit014f9477f4bdb04ca3accad0a7c986c2dff90e1f (patch)
tree9f39adfc47d300d5a71c482a15c28631ee58d8c4 /gdb/remote.c
parente799154c3bf1aac0bffd869df5eed7a959305d00 (diff)
downloadbinutils-gdb-014f9477f4bdb04ca3accad0a7c986c2dff90e1f.tar.gz
constify to_open
This makes target_ops::to_open take a const string and then fixes the fallout. There were a few of these I could not build. However I eyeballed it and in any case the fixes should generally be trivial. This is based on the patch to fix up the target debugging for to_open, because that changes gdb to not directly install to_open as the target command 2014-07-30 Tom Tromey <tromey@redhat.com> * bsd-kvm.c (bsd_kvm_open): Constify. * corelow.c (core_open): Constify. * ctf.c (ctf_open): Constify. * dbug-rom.c (dbug_open): Constify. * exec.c (exec_open): Constify. * m32r-rom.c (m32r_open, mon2000_open): Constify. * microblaze-rom.c (picobug_open): Constify. * nto-procfs.c (procfs_open_1, procfs_open, procfs_native_open): Constify. * ppcbug-rom.c (ppcbug_open0, ppcbug_open1): Constify. * record-btrace.c (record_btrace_open): Constify. * record-full.c (record_full_core_open_1, record_full_open_1) (record_full_open): Constify. * remote-m32r-sdi.c (m32r_open): Constify. * remote-mips.c (common_open, mips_open, pmon_open, ddb_open) (rockhopper_open, lsi_open): Constify. * remote-sim.c (gdbsim_open): Constify. * remote.c (remote_open, extended_remote_open, remote_open_1): Constify. * target.h (struct target_ops) <to_open>: Make "arg" const. * tracefile-tfile.c (tfile_open): Constify.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 3a05bfd1a6b..fcddd1cc864 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -102,11 +102,8 @@ static void remote_files_info (struct target_ops *ignore);
static void remote_prepare_to_store (struct target_ops *self,
struct regcache *regcache);
-static void remote_open (char *name, int from_tty);
-
-static void extended_remote_open (char *name, int from_tty);
-
-static void remote_open_1 (char *, int, struct target_ops *, int extended_p);
+static void remote_open_1 (const char *, int, struct target_ops *,
+ int extended_p);
static void remote_close (struct target_ops *self);
@@ -3619,7 +3616,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
NAME is the filename used for communication. */
static void
-remote_open (char *name, int from_tty)
+remote_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &remote_ops, 0);
}
@@ -3628,7 +3625,7 @@ remote_open (char *name, int from_tty)
remote gdb protocol. NAME is the filename used for communication. */
static void
-extended_remote_open (char *name, int from_tty)
+extended_remote_open (const char *name, int from_tty)
{
remote_open_1 (name, from_tty, &extended_remote_ops, 1 /*extended_p */);
}
@@ -4128,7 +4125,7 @@ remote_unpush_target (void)
}
static void
-remote_open_1 (char *name, int from_tty,
+remote_open_1 (const char *name, int from_tty,
struct target_ops *target, int extended_p)
{
struct remote_state *rs = get_remote_state ();