process.cc (13894:8603648c1679) process.cc (14010:0e1e887507c0)
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;

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

157 uint64_t argc = argv.size();
158 if (intSize == 8)
159 argc = htog((uint64_t)argc);
160 else if (intSize == 4)
161 argc = htog((uint32_t)argc);
162 else
163 panic("Unknown int size");
164
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;

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

157 uint64_t argc = argv.size();
158 if (intSize == 8)
159 argc = htog((uint64_t)argc);
160 else if (intSize == 4)
161 argc = htog((uint32_t)argc);
162 else
163 panic("Unknown int size");
164
165 initVirtMem.writeBlob(memState->getStackMin(), (uint8_t*)&argc, intSize);
165 initVirtMem.writeBlob(memState->getStackMin(), &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 Addr auxv_array_end = auxv_array_base;
172 for (const auto &aux: auxv) {
173 initVirtMem.write(auxv_array_end, aux, GuestByteOrder);

--- 80 unchanged lines hidden ---
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 Addr auxv_array_end = auxv_array_base;
172 for (const auto &aux: auxv) {
173 initVirtMem.write(auxv_array_end, aux, GuestByteOrder);

--- 80 unchanged lines hidden ---