aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJiri Gaisler <jiri@gaisler.se>2015-02-19 23:31:25 +0100
committerMike Frysinger <vapier@gentoo.org>2015-02-21 23:29:58 -0500
commite26473a140d91672765866857e2284e4a7f105b4 (patch)
tree0b4982d986c938278457139ab824dd5604896c4f /sim
parent96d67095792f5c8c0c91522820de861e54c37728 (diff)
downloadgdb-e26473a140d91672765866857e2284e4a7f105b4.zip
gdb-e26473a140d91672765866857e2284e4a7f105b4.tar.gz
gdb-e26473a140d91672765866857e2284e4a7f105b4.tar.bz2
sim/erc32: File loading via command line did not work
* sis.c (main) load binary file from argv parameters
Diffstat (limited to 'sim')
-rw-r--r--sim/erc32/sis.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index f2aed78..d7fa245 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -171,6 +171,7 @@ main(argc, argv)
char *cmdq[HIST_LEN];
int cmdi = 0;
int i;
+ int lfile = 0;
cfile = 0;
for (i = 0; i < 64; i++)
@@ -219,7 +220,7 @@ main(argc, argv)
exit(1);
}
} else {
- last_load_addr = bfd_load(argv[stat]);
+ lfile = stat;
}
stat++;
}
@@ -241,6 +242,8 @@ main(argc, argv)
reset_all();
init_bpt(&sregs);
init_sim();
+ if (lfile)
+ last_load_addr = bfd_load(argv[lfile]);
#ifdef STAT
reset_stat(&sregs);
#endif