This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 07/23] sim/erc32: file loading via command line did not work


	* sis.c (main) load binary file from argv parameters
---
 sim/erc32/sis.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index f2aed78..39050d7 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,7 @@ 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
-- 
2.1.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]