pseudo_inst.cc (11058:d0934b57735a) pseudo_inst.cc (11259:4006183015a1)
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

560 // copy out target filename
561 char fn[100];
562 std::string filename;
563 CopyStringOut(tc, fn, filename_addr, 100);
564 filename = std::string(fn);
565
566 if (offset == 0) {
567 // create a new file (truncate)
1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

560 // copy out target filename
561 char fn[100];
562 std::string filename;
563 CopyStringOut(tc, fn, filename_addr, 100);
564 filename = std::string(fn);
565
566 if (offset == 0) {
567 // create a new file (truncate)
568 os = simout.create(filename, true);
568 os = simout.create(filename, true, true);
569 } else {
570 // do not truncate file if offset is non-zero
571 // (ios::in flag is required as well to keep the existing data
572 // intact, otherwise existing data will be zeroed out.)
573 os = simout.openFile(simout.directory() + filename,
569 } else {
570 // do not truncate file if offset is non-zero
571 // (ios::in flag is required as well to keep the existing data
572 // intact, otherwise existing data will be zeroed out.)
573 os = simout.openFile(simout.directory() + filename,
574 ios::in | ios::out | ios::binary);
574 ios::in | ios::out | ios::binary, true);
575 }
576 if (!os)
577 panic("could not open file %s\n", filename);
578
579 // seek to offset
580 os->seekp(offset);
581
582 // copy out data and write to file

--- 138 unchanged lines hidden ---
575 }
576 if (!os)
577 panic("could not open file %s\n", filename);
578
579 // seek to offset
580 os->seekp(offset);
581
582 // copy out data and write to file

--- 138 unchanged lines hidden ---