vfs: check userland buffers before reading them.
[haiku.git] / src / kits / debugger / value / ValueWriter.h
blob8a5ed075474c4bba091d61ab71c4e1cbe3ad864e
1 /*
2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef VALUE_WRITER_H
7 #define VALUE_WRITER_H
10 #include <OS.h>
11 #include <String.h>
13 #include <Variant.h>
16 class Architecture;
17 class CpuState;
18 class DebuggerInterface;
19 class ValueLocation;
22 class ValueWriter {
23 public:
24 ValueWriter(Architecture* architecture,
25 DebuggerInterface* interface,
26 CpuState* cpuState,
27 thread_id targetThread);
28 // cpuState can be NULL
29 ~ValueWriter();
31 Architecture* GetArchitecture() const
32 { return fArchitecture; }
34 status_t WriteValue(ValueLocation* location,
35 BVariant& value);
37 private:
38 Architecture* fArchitecture;
39 DebuggerInterface* fDebuggerInterface;
40 CpuState* fCpuState;
41 thread_id fTargetThread;
45 #endif // VALUE_WRITER_H