aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-mips.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-mips.c
parente799154c3bf1aac0bffd869df5eed7a959305d00 (diff)
downloadgdb-014f9477f4bdb04ca3accad0a7c986c2dff90e1f.zip
gdb-014f9477f4bdb04ca3accad0a7c986c2dff90e1f.tar.gz
gdb-014f9477f4bdb04ca3accad0a7c986c2dff90e1f.tar.bz2
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-mips.c')
-rw-r--r--gdb/remote-mips.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 277621d..236f3cd 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -77,14 +77,6 @@ static ULONGEST mips_request (int cmd, ULONGEST addr, ULONGEST data,
static void mips_initialize (void);
-static void mips_open (char *name, int from_tty);
-
-static void pmon_open (char *name, int from_tty);
-
-static void ddb_open (char *name, int from_tty);
-
-static void lsi_open (char *name, int from_tty);
-
static void mips_close (struct target_ops *self);
static int mips_map_regno (struct gdbarch *, int);
@@ -1541,7 +1533,7 @@ mips_initialize (void)
/* Open a connection to the remote board. */
static void
-common_open (struct target_ops *ops, char *name, int from_tty,
+common_open (struct target_ops *ops, const char *name, int from_tty,
enum mips_monitor_type new_monitor,
const char *new_monitor_prompt)
{
@@ -1669,7 +1661,7 @@ seen from the board via TFTP, specify that name as the third parameter.\n"));
/* Open a connection to an IDT board. */
static void
-mips_open (char *name, int from_tty)
+mips_open (const char *name, int from_tty)
{
const char *monitor_prompt = NULL;
if (gdbarch_bfd_arch_info (target_gdbarch ()) != NULL
@@ -1694,7 +1686,7 @@ mips_open (char *name, int from_tty)
/* Open a connection to a PMON board. */
static void
-pmon_open (char *name, int from_tty)
+pmon_open (const char *name, int from_tty)
{
common_open (&pmon_ops, name, from_tty, MON_PMON, "PMON> ");
}
@@ -1702,7 +1694,7 @@ pmon_open (char *name, int from_tty)
/* Open a connection to a DDB board. */
static void
-ddb_open (char *name, int from_tty)
+ddb_open (const char *name, int from_tty)
{
common_open (&ddb_ops, name, from_tty, MON_DDB, "NEC010>");
}
@@ -1710,7 +1702,7 @@ ddb_open (char *name, int from_tty)
/* Open a connection to a rockhopper board. */
static void
-rockhopper_open (char *name, int from_tty)
+rockhopper_open (const char *name, int from_tty)
{
common_open (&rockhopper_ops, name, from_tty, MON_ROCKHOPPER, "NEC01>");
}
@@ -1718,7 +1710,7 @@ rockhopper_open (char *name, int from_tty)
/* Open a connection to an LSI board. */
static void
-lsi_open (char *name, int from_tty)
+lsi_open (const char *name, int from_tty)
{
int i;