summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-08-01 18:19:23 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-08-01 18:19:23 -0700
commite719a3e4c058920fb5913a38fbe4976d53a0e6e2 (patch)
tree250c8a334c7393db03ae1ef83fa016b87ba9e0f6 /src/arch
parenta3e70f495749334670e9fa392c4212794707d0d8 (diff)
downloadgem5-e719a3e4c058920fb5913a38fbe4976d53a0e6e2.tar.xz
Fix how the "cmd" parameter is set in se.py and remove hack in x86 process initialization code.
--HG-- extra : convert_revision : 1fc741eea956ebfa4cef488eef4333d1f50617a6
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/process.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 17904cb33..afe41cdeb 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -290,18 +290,19 @@ X86LiveProcess::argsInit(int intSize, int pageSize)
//This is the name of the file which is present on the initial stack
//It's purpose is to let the user space linker examine the original file.
- int file_name_size = filename.size();
+ int file_name_size = filename.size() + 1;
string platform = "x86_64";
int aux_data_size = platform.size() + 1;
int env_data_size = 0;
for (int i = 0; i < envp.size(); ++i) {
- env_data_size += envp[i].size();
+ env_data_size += envp[i].size() + 1;
}
int arg_data_size = 0;
for (int i = 0; i < argv.size(); ++i) {
- arg_data_size += argv[i].size();
+ warn("Argv[%d] size is %d\n", i, argv[i].size() + 1);
+ arg_data_size += argv[i].size() + 1;
}
//The auxiliary vector data needs to be padded so it's size is a multiple