util: Add the m5_loadsymbol pseudo op to the m5 tool
authorAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 8 May 2017 09:57:17 +0000 (10:57 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 9 May 2017 09:24:06 +0000 (09:24 +0000)
Change-Id: Ib8bf4eac77170db8b2bf44796fd9d46b02217d03
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3122
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
util/m5/m5.c
util/m5/m5op.h

index ee921347d433fb3373063d386618620d2ba9e374..8e21276b0a1f14d62f47f1e59f867971a3c0cb12 100644 (file)
@@ -251,6 +251,16 @@ do_addsymbol(int argc, char *argv[])
     m5_addsymbol(addr, symbol);
 }
 
+
+void
+do_loadsymbol(int argc, char *argv[])
+{
+    if (argc > 0)
+        usage();
+
+    m5_loadsymbol();
+}
+
 void
 do_initparam(int argc, char *argv[])
 {
@@ -321,6 +331,7 @@ struct MainFunc mainfuncs[] = {
     { "execfile",       do_exec_file,        "" },
     { "checkpoint",     do_checkpoint,       "[delay [period]]" },
     { "addsymbol",      do_addsymbol,        "<address> <symbol>" },
+    { "loadsymbol",     do_loadsymbol,       "" },
     { "initparam",      do_initparam,        "[key] // key must be shorter than 16 chars" },
     { "sw99param",      do_sw99param,        "" },
 #ifdef linux
index d9fcb3231a3df691a56d3658794ab65e4a73f4c1..f2d85fe97aa97232c34281ab72100846a58c3135 100644 (file)
@@ -59,6 +59,7 @@ void m5_debugbreak(void);
 void m5_switchcpu(void);
 void m5_togglesync(void);
 void m5_addsymbol(uint64_t addr, char *symbol);
+void m5_loadsymbol();
 void m5_panic(void);
 void m5_work_begin(uint64_t workid, uint64_t threadid);
 void m5_work_end(uint64_t workid, uint64_t threadid);