process.cc (4111:65fffcb4fae9) | process.cc (4117:2807cee7b892) |
---|---|
1/* 2 * Copyright (c) 2001-2005 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; --- 286 unchanged lines hidden (view full) --- 295 296//////////////////////////////////////////////////////////////////////// 297// 298// LiveProcess member definitions 299// 300//////////////////////////////////////////////////////////////////////// 301 302 | 1/* 2 * Copyright (c) 2001-2005 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; --- 286 unchanged lines hidden (view full) --- 295 296//////////////////////////////////////////////////////////////////////// 297// 298// LiveProcess member definitions 299// 300//////////////////////////////////////////////////////////////////////// 301 302 |
303void 304copyStringArray(vector<string> &strings, Addr array_ptr, Addr data_ptr, 305 TranslatingPort* memPort, int ptr_size) 306{ 307 Addr data_ptr_swap; 308 for (int i = 0; i < strings.size(); ++i) { 309 data_ptr_swap = htog(data_ptr); 310 memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr_swap, ptr_size); 311 memPort->writeString(data_ptr, strings[i].c_str()); 312 array_ptr += ptr_size; 313 data_ptr += strings[i].size() + 1; 314 } 315 // add NULL terminator 316 data_ptr = 0; 317 318 memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr, ptr_size); 319} 320 | |
321LiveProcess::LiveProcess(const string &nm, ObjectFile *_objFile, 322 System *_system, 323 int stdin_fd, int stdout_fd, int stderr_fd, 324 vector<string> &_argv, vector<string> &_envp, 325 const string &_cwd, 326 uint64_t _uid, uint64_t _euid, 327 uint64_t _gid, uint64_t _egid, 328 uint64_t _pid, uint64_t _ppid) --- 272 unchanged lines hidden --- | 303LiveProcess::LiveProcess(const string &nm, ObjectFile *_objFile, 304 System *_system, 305 int stdin_fd, int stdout_fd, int stderr_fd, 306 vector<string> &_argv, vector<string> &_envp, 307 const string &_cwd, 308 uint64_t _uid, uint64_t _euid, 309 uint64_t _gid, uint64_t _egid, 310 uint64_t _pid, uint64_t _ppid) --- 272 unchanged lines hidden --- |