Fix how the "cmd" parameter is set in se.py and remove hack in x86 process initialization code.
--HG-- extra : convert_revision : 1fc741eea956ebfa4cef488eef4333d1f50617a6
This commit is contained in:
parent
a3e70f4957
commit
e719a3e4c0
2 changed files with 5 additions and 4 deletions
|
@ -64,7 +64,7 @@ if args:
|
||||||
|
|
||||||
process = LiveProcess()
|
process = LiveProcess()
|
||||||
process.executable = options.cmd
|
process.executable = options.cmd
|
||||||
process.cmd = options.cmd + " " + options.options
|
process.cmd = [options.cmd] + options.options.split()
|
||||||
if options.input != "":
|
if options.input != "":
|
||||||
process.input = options.input
|
process.input = options.input
|
||||||
|
|
||||||
|
|
|
@ -290,18 +290,19 @@ X86LiveProcess::argsInit(int intSize, int pageSize)
|
||||||
|
|
||||||
//This is the name of the file which is present on the initial stack
|
//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.
|
//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";
|
string platform = "x86_64";
|
||||||
int aux_data_size = platform.size() + 1;
|
int aux_data_size = platform.size() + 1;
|
||||||
|
|
||||||
int env_data_size = 0;
|
int env_data_size = 0;
|
||||||
for (int i = 0; i < envp.size(); ++i) {
|
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;
|
int arg_data_size = 0;
|
||||||
for (int i = 0; i < argv.size(); ++i) {
|
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
|
//The auxiliary vector data needs to be padded so it's size is a multiple
|
||||||
|
|
Loading…
Reference in a new issue