sim: constify prog_name
There's no need for the prog_name handed down to the core to be mutable, so add const markings to it and all the related funcs.
This commit is contained in:
parent
cfa7ea2a96
commit
b2b255bdf3
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* remote-sim.c (gdbsim_load): Add const to prog.
|
||||
|
||||
2014-03-03 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* elfread.c (probe_key): Change to bfd_data.
|
||||
|
|
|
@ -564,7 +564,7 @@ static void
|
|||
gdbsim_load (struct target_ops *self, char *args, int fromtty)
|
||||
{
|
||||
char **argv;
|
||||
char *prog;
|
||||
const char *prog;
|
||||
struct sim_inferior_data *sim_data
|
||||
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NEEDED);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* remote-sim.h (sim_load): Add const to prog.
|
||||
|
||||
2014-02-09 Doug Evans <xdje42@gmail.com>
|
||||
|
||||
* section-scripts.h: New file.
|
||||
|
|
|
@ -140,7 +140,7 @@ void sim_close (SIM_DESC sd, int quitting);
|
|||
Such manipulation should probably (?) occure in
|
||||
sim_create_inferior. */
|
||||
|
||||
SIM_RC sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty);
|
||||
SIM_RC sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty);
|
||||
|
||||
|
||||
/* Prepare to run the simulated program.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* wrapper.c (sim_load): Add const to prog.
|
||||
|
||||
2013-09-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -888,7 +888,7 @@ sim_close (sd, quitting)
|
|||
SIM_RC
|
||||
sim_load (sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char *prog;
|
||||
const char *prog;
|
||||
bfd *abfd;
|
||||
int from_tty ATTRIBUTE_UNUSED;
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2013-09-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -13,8 +17,7 @@
|
|||
2012-05-24 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR gdb/7205
|
||||
|
||||
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
|
||||
* Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
|
||||
|
||||
2012-03-24 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
|
|
|
@ -1793,7 +1793,7 @@ sim_close (SIM_DESC sd, int quitting)
|
|||
}
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
|
||||
{
|
||||
bfd *prog_bfd;
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-hload.c (sim_load): Add const to prog.
|
||||
* sim-load.c (sim_load_file): Likewise.
|
||||
* sim-utils.c (sim_analyze_program): Likewise.
|
||||
* sim-utils.h (sim_analyze_program): Likewise.
|
||||
(sim_load_file): Likewise.
|
||||
|
||||
2014-03-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* acinclude.m4 (build_warnings): Copy from gdb/configure.ac.
|
||||
|
|
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
modeling a hardware platform. */
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog_name, struct bfd *prog_bfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog_name, struct bfd *prog_bfd, int from_tty)
|
||||
{
|
||||
bfd *result_bfd;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static void xprintf_bfd_vma (host_callback *, bfd_vma);
|
|||
|
||||
bfd *
|
||||
sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
|
||||
char *prog, bfd *prog_bfd, int verbose_p, int lma_p,
|
||||
const char *prog, bfd *prog_bfd, int verbose_p, int lma_p,
|
||||
sim_write_fn do_write)
|
||||
{
|
||||
asection *s;
|
||||
|
|
|
@ -211,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);
|
||||
|
|
|
@ -45,7 +45,7 @@ unsigned long sim_elapsed_time_since (SIM_ELAPSED_TIME start);
|
|||
|
||||
/* Utilities for manipulating the load image. */
|
||||
|
||||
SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
|
||||
SIM_RC sim_analyze_program (SIM_DESC sd, const char *prog_name,
|
||||
struct bfd *prog_bfd);
|
||||
|
||||
/* Load program PROG into the simulator using the function DO_LOAD.
|
||||
|
@ -63,7 +63,7 @@ SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
|
|||
typedef int sim_write_fn (SIM_DESC sd, SIM_ADDR mem,
|
||||
const unsigned char *buf, int length);
|
||||
struct bfd *sim_load_file (SIM_DESC sd, const char *myname,
|
||||
host_callback *callback, char *prog,
|
||||
host_callback *callback, const char *prog,
|
||||
struct bfd *prog_bfd, int verbose_p,
|
||||
int lma_p, sim_write_fn do_load);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-03-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -1567,7 +1567,7 @@ sim_do_command (sd, cmd)
|
|||
}
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty)
|
||||
{
|
||||
extern bfd *sim_load_file (); /* ??? Don't know where this should live. */
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-if.c (sim_load): Add const to prog.
|
||||
|
||||
2014-03-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -343,7 +343,7 @@ cris_program_offset_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf,
|
|||
files differently. */
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog_name, struct bfd *prog_bfd,
|
||||
sim_load (SIM_DESC sd, const char *prog_name, struct bfd *prog_bfd,
|
||||
int from_tty ATTRIBUTE_UNUSED)
|
||||
{
|
||||
bfd *result_bfd;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-03-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -1490,7 +1490,7 @@ sim_do_command (sd, cmd)
|
|||
SIM_RC
|
||||
sim_load (sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char *prog;
|
||||
const char *prog;
|
||||
bfd *abfd;
|
||||
int from_tty;
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interf.c (sim_load): Add const to prog.
|
||||
|
||||
2013-10-09 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR sim/16018:
|
||||
|
|
|
@ -290,7 +290,7 @@ sim_close(sd, quitting)
|
|||
SIM_RC
|
||||
sim_load(sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char *prog;
|
||||
const char *prog;
|
||||
bfd *abfd;
|
||||
int from_tty;
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* compile.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR gdb/16450
|
||||
|
|
|
@ -4974,7 +4974,7 @@ sim_close (SIM_DESC sd, int quitting)
|
|||
/* Called by gdb to load a program into memory. */
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
|
||||
{
|
||||
bfd *prog_bfd;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* gdb-if.c (sim_load): Add const to prog.
|
||||
|
||||
2013-09-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -128,7 +128,7 @@ open_objfile (const char *filename)
|
|||
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, struct bfd * abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, struct bfd * abfd, int from_tty)
|
||||
{
|
||||
check_desc (sd);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR gdb/16450
|
||||
|
|
|
@ -1922,7 +1922,7 @@ sim_close (sd, quitting)
|
|||
SIM_RC
|
||||
sim_load (sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char * prog;
|
||||
const char * prog;
|
||||
bfd * abfd;
|
||||
int from_tty;
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR gdb/16450
|
||||
|
|
|
@ -887,7 +887,7 @@ sim_close (SIM_DESC sd, int quitting)
|
|||
}
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
|
||||
{
|
||||
/* Do the right thing for ELF executables; this turns out to be
|
||||
just about the right thing for any object format that:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR gdb/16450
|
||||
|
|
|
@ -1230,7 +1230,7 @@ load_dtb (SIM_DESC sd, const char *filename)
|
|||
SIM_RC
|
||||
sim_load (sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char * prog;
|
||||
const char * prog;
|
||||
bfd * abfd;
|
||||
int from_tty;
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim_calls.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Aaro Koskinen <aaro.koskinen@iki.fi>
|
||||
|
||||
PR gdb/12202
|
||||
|
|
|
@ -97,7 +97,7 @@ sim_close (SIM_DESC sd, int quitting)
|
|||
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
|
||||
{
|
||||
TRACE(trace_gdb, ("sim_load(prog=%s, from_tty=%d) called\n",
|
||||
prog, from_tty));
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* gdb-if.c (sim_load): Add const to prog.
|
||||
|
||||
2013-09-23 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
|
|
@ -140,7 +140,7 @@ open_objfile (const char *filename)
|
|||
/* Load a program. */
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty)
|
||||
{
|
||||
check_desc (sd);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* gdb-if.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* gdb-if.c (rx_signal_to_host): Rename to
|
||||
|
|
|
@ -192,7 +192,7 @@ addr_in_swap_list (bfd_vma addr)
|
|||
}
|
||||
|
||||
SIM_RC
|
||||
sim_load (SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty)
|
||||
sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty)
|
||||
{
|
||||
check_desc (sd);
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2014-03-05 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_load): Add const to prog.
|
||||
|
||||
2014-02-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR gdb/16450
|
||||
|
|
|
@ -2685,7 +2685,7 @@ sim_close (sd, quitting)
|
|||
SIM_RC
|
||||
sim_load (sd, prog, abfd, from_tty)
|
||||
SIM_DESC sd;
|
||||
char *prog;
|
||||
const char *prog;
|
||||
bfd *abfd;
|
||||
int from_tty;
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue