vfs: check userland buffers before reading them.
[haiku.git] / src / kits / debugger / target_host_interface / local / LocalTargetHostInterface.h
blob6b8d3c74d6963cdff8eedd8c94a73f791b56c0fe
1 /*
2 * Copyright 2016, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef LOCAL_TARGET_HOST_INTERFACE_H
6 #define LOCAL_TARGET_HOST_INTERFACE_H
8 #include "TargetHostInterface.h"
11 class LocalTargetHostInterface : public TargetHostInterface {
12 public:
13 LocalTargetHostInterface();
14 virtual ~LocalTargetHostInterface();
16 virtual status_t Init(Settings* settings);
17 virtual void Close();
19 virtual bool IsLocal() const;
20 virtual bool Connected() const;
22 virtual TargetHost* GetTargetHost();
24 virtual status_t Attach(team_id id, thread_id threadID,
25 DebuggerInterface*& _interface) const;
26 virtual status_t CreateTeam(int commandLineArgc,
27 const char* const* arguments,
28 team_id& _teamID) const;
29 virtual status_t LoadCore(const char* coreFilePath,
30 DebuggerInterface*& _interface,
31 thread_id& _thread) const;
33 virtual status_t FindTeamByThread(thread_id thread,
34 team_id& _teamID) const;
37 private:
38 static status_t _PortLoop(void* arg);
39 status_t _HandleTeamEvent(team_id team, int32 opcode,
40 bool& addToWaiters);
42 private:
43 TargetHost* fTargetHost;
44 port_id fDataPort;
45 thread_id fPortWorker;
48 #endif // LOCAL_TARGET_HOST_INTERFACE_H