aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-23 00:41:21 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-23 17:40:32 -0400
commit9a28444faa68e2f93210cf8ed5a2375e79de19a9 (patch)
tree72e97973090958df51ffd6d1bff88f954a5211a5 /sim
parente82a36be9a4bb2b27379b2b3862c5ff09cdfab8b (diff)
downloadgdb-9a28444faa68e2f93210cf8ed5a2375e79de19a9.zip
gdb-9a28444faa68e2f93210cf8ed5a2375e79de19a9.tar.gz
gdb-9a28444faa68e2f93210cf8ed5a2375e79de19a9.tar.bz2
sim: rl78: rename open symbol to avoid collisions
If the header files define open(), make sure our local open var doesn't shadow it.
Diffstat (limited to 'sim')
-rw-r--r--sim/rl78/ChangeLog6
-rw-r--r--sim/rl78/gdb-if.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index ecd9ed0..60102ee 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -1,3 +1,9 @@
+2021-05-23 Mike Frysinger <vapier@gentoo.org>
+
+ * gdb-if.c (open): Rename to ...
+ (is_open): ... this.
+ (sim_open, sim_close): Rename open to is_open.
+
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* cpu.c, gdb-if.c, load.c, main.c, mem.c, rl78.c, trace.c: Replace
diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c
index a2414f9..ee79965 100644
--- a/sim/rl78/gdb-if.c
+++ b/sim/rl78/gdb-if.c
@@ -56,7 +56,7 @@ static struct sim_state the_minisim = {
"This is the sole rl78 minisim instance."
};
-static int open;
+static int is_open;
static struct host_callback_struct *host_callbacks;
@@ -69,7 +69,7 @@ sim_open (SIM_OPEN_KIND kind,
struct host_callback_struct *callback,
struct bfd *abfd, char * const *argv)
{
- if (open)
+ if (is_open)
fprintf (stderr, "rl78 minisim: re-opened sim\n");
/* The 'run' interface doesn't use this function, so we don't care
@@ -88,7 +88,7 @@ sim_open (SIM_OPEN_KIND kind,
trace = 0;
sim_disasm_init (abfd);
- open = 1;
+ is_open = 1;
while (argv != NULL && *argv != NULL)
{
@@ -145,7 +145,7 @@ sim_close (SIM_DESC sd, int quitting)
/* Not much to do. At least free up our memory. */
init_mem ();
- open = 0;
+ is_open = 0;
}
/* Open the program to run; print a message if the program cannot