43a44
> #include <string>
46a48
> #include "mem/translating_port.hh"
60a63,64
> //This needs to be templated for cases where 32 bit pointers are needed.
> template<class AddrType>
62,63c66,80
< copyStringArray(std::vector<std::string> &strings, Addr array_ptr,
< Addr data_ptr, TranslatingPort* memPort, int ptr_size = sizeof(Addr));
---
> copyStringArray(std::vector<std::string> &strings,
> AddrType array_ptr, AddrType data_ptr,
> TranslatingPort* memPort)
> {
> AddrType data_ptr_swap;
> for (int i = 0; i < strings.size(); ++i) {
> data_ptr_swap = htog(data_ptr);
> memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr_swap,
> sizeof(AddrType));
> memPort->writeString(data_ptr, strings[i].c_str());
> array_ptr += sizeof(AddrType);
> data_ptr += strings[i].size() + 1;
> }
> // add NULL terminator
> data_ptr = 0;
64a82,84
> memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr, sizeof(AddrType));
> }
>