From 0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Tue, 31 Jan 2012 07:46:04 -0800 Subject: util: implements "writefile" gem5 op to export file from guest to host filesystem Usage: m5 writefile File will be created in the gem5 output folder with the identical filename. Implementation is largely based on the existing "readfile" functionality. Currently does not support exporting of folders. --- src/sim/pseudo_inst.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sim/pseudo_inst.hh') diff --git a/src/sim/pseudo_inst.hh b/src/sim/pseudo_inst.hh index 673ec6170..ae93c6877 100644 --- a/src/sim/pseudo_inst.hh +++ b/src/sim/pseudo_inst.hh @@ -55,6 +55,8 @@ void quiesceCycles(ThreadContext *tc, uint64_t cycles); uint64_t quiesceTime(ThreadContext *tc); uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset); +uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, + uint64_t offset, Addr filenameAddr); void loadsymbol(ThreadContext *xc); void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr); uint64_t initParam(ThreadContext *xc); -- cgit v1.2.3