sim: constify prog_name
[deliverable/binutils-gdb.git] / sim / common / sim-utils.c
index c5c8e9876b31a52faad7581e5953e47a8c99a979..64291f0c5b7208633847237e204e6bff58abba58 100644 (file)
@@ -1,6 +1,5 @@
 /* Miscellaneous simulator utilities.
-   Copyright (C) 1997, 1998, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2014 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -212,7 +211,7 @@ sim_add_commas (char *buf, int sizeof_buf, unsigned long value)
    bfd open.  */
 
 SIM_RC
-sim_analyze_program (SIM_DESC sd, char *prog_name, bfd *prog_bfd)
+sim_analyze_program (SIM_DESC sd, const char *prog_name, bfd *prog_bfd)
 {
   asection *s;
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
@@ -235,13 +234,13 @@ sim_analyze_program (SIM_DESC sd, char *prog_name, bfd *prog_bfd)
   prog_bfd = bfd_openr (prog_name, STATE_TARGET (sd));
   if (prog_bfd == NULL)
     {
-      sim_io_eprintf (sd, "%s: can't open \"%s\": %s\n", 
+      sim_io_eprintf (sd, "%s: can't open \"%s\": %s\n",
                      STATE_MY_NAME (sd),
                      prog_name,
                      bfd_errmsg (bfd_get_error ()));
       return SIM_RC_FAIL;
     }
-  if (!bfd_check_format (prog_bfd, bfd_object)) 
+  if (!bfd_check_format (prog_bfd, bfd_object))
     {
       sim_io_eprintf (sd, "%s: \"%s\" is not an object file: %s\n",
                      STATE_MY_NAME (sd),
@@ -402,5 +401,3 @@ transfer_to_str (unsigned transfer)
     default: return "(error)";
     }
 }
-
-
This page took 0.024161 seconds and 4 git commands to generate.