process.cc (12448:b299e560f1d8) process.cc (13028:9a09c342891e)
1/*
2 * Copyright (c) 2003-2004 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 156 unchanged lines hidden (view full) ---

165 initVirtMem.writeBlob(memState->getStackMin(), (uint8_t*)&argc, intSize);
166
167 copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem);
168 copyStringArray(envp, envp_array_base, env_data_base, initVirtMem);
169
170 //Copy the aux stuff
171 for (vector<auxv_t>::size_type x = 0; x < auxv.size(); x++) {
172 initVirtMem.writeBlob(auxv_array_base + x * 2 * intSize,
1/*
2 * Copyright (c) 2003-2004 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 156 unchanged lines hidden (view full) ---

165 initVirtMem.writeBlob(memState->getStackMin(), (uint8_t*)&argc, intSize);
166
167 copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem);
168 copyStringArray(envp, envp_array_base, env_data_base, initVirtMem);
169
170 //Copy the aux stuff
171 for (vector<auxv_t>::size_type x = 0; x < auxv.size(); x++) {
172 initVirtMem.writeBlob(auxv_array_base + x * 2 * intSize,
173 (uint8_t*)&(auxv[x].a_type), intSize);
173 (uint8_t*)&(auxv[x].getAuxType()), intSize);
174 initVirtMem.writeBlob(auxv_array_base + (x * 2 + 1) * intSize,
174 initVirtMem.writeBlob(auxv_array_base + (x * 2 + 1) * intSize,
175 (uint8_t*)&(auxv[x].a_val), intSize);
175 (uint8_t*)&(auxv[x].getAuxVal()), intSize);
176 }
177
178 ThreadContext *tc = system->getThreadContext(contextIds[0]);
179
180 setSyscallArg(tc, 0, argc);
181 setSyscallArg(tc, 1, argv_array_base);
182 tc->setIntReg(StackPointerReg, memState->getStackMin());
183

--- 71 unchanged lines hidden ---
176 }
177
178 ThreadContext *tc = system->getThreadContext(contextIds[0]);
179
180 setSyscallArg(tc, 0, argc);
181 setSyscallArg(tc, 1, argv_array_base);
182 tc->setIntReg(StackPointerReg, memState->getStackMin());
183

--- 71 unchanged lines hidden ---