gem5
|
TypedBufferArg is a class template; instances of this template represent typed buffers in target user space that are passed by reference to an (emulated) system call. More...
#include <syscall_emul_buf.hh>
Public Member Functions | |
TypedBufferArg (Addr _addr, int _size=sizeof(T)) | |
Allocate a buffer of type T representing the memory at target address 'addr'. More... | |
operator T * () | |
Convert TypedBufferArg<T> to a pointer to T that points to the internal buffer. More... | |
T & | operator* () |
Convert TypedBufferArg<T> to a reference to T that references the internal buffer value. More... | |
T * | operator-> () |
Enable the use of '->' to reference fields where T is a struct type. More... | |
T & | operator[] (int i) |
Enable the use of '[]' to reference fields where T is an array type. More... | |
Public Member Functions inherited from BaseBufferArg | |
BaseBufferArg (Addr _addr, int _size) | |
Allocate a buffer of size 'size' representing the memory at target address 'addr'. More... | |
~BaseBufferArg () | |
bool | copyIn (SETranslatingPortProxy &memproxy) |
copy data into simulator space (read from target memory) More... | |
bool | copyOut (SETranslatingPortProxy &memproxy) |
copy data out of simulator space (write to target memory) More... | |
Additional Inherited Members | |
Protected Attributes inherited from BaseBufferArg | |
const Addr | addr |
address of buffer in target address space More... | |
const int | size |
buffer size More... | |
uint8_t *const | bufPtr |
pointer to buffer in simulator space More... | |
TypedBufferArg is a class template; instances of this template represent typed buffers in target user space that are passed by reference to an (emulated) system call.
This template provides operator overloads for convenience, allowing for example the use of '->' to reference fields within a struct type.
Definition at line 128 of file syscall_emul_buf.hh.
|
inline |
Allocate a buffer of type T representing the memory at target address 'addr'.
The user can optionally specify a specific number of bytes to allocate to deal with structs that have variable-size arrays at the end.
Definition at line 137 of file syscall_emul_buf.hh.
|
inline |
Convert TypedBufferArg<T> to a pointer to T that points to the internal buffer.
Definition at line 145 of file syscall_emul_buf.hh.
References BaseBufferArg::bufPtr.
|
inline |
Convert TypedBufferArg<T> to a reference to T that references the internal buffer value.
Definition at line 151 of file syscall_emul_buf.hh.
References BaseBufferArg::bufPtr.
|
inline |
Enable the use of '->' to reference fields where T is a struct type.
Definition at line 158 of file syscall_emul_buf.hh.
References BaseBufferArg::bufPtr.
|
inline |
Enable the use of '[]' to reference fields where T is an array type.
Definition at line 164 of file syscall_emul_buf.hh.
References BaseBufferArg::bufPtr, and ArmISA::i.