vfs: check userland buffers before reading them.
[haiku.git] / src / kits / debugger / debug_managers / BreakpointManager.h
blob0933c4d184dc25b57ea097eb17bba924a8ad1743
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef BREAKPOINT_MANAGER_H
6 #define BREAKPOINT_MANAGER_H
8 #include <Locker.h>
10 #include "Breakpoint.h"
13 class DebuggerInterface;
14 class Team;
17 class BreakpointManager {
18 public:
19 BreakpointManager(Team* team,
20 DebuggerInterface* debuggerInterface);
21 ~BreakpointManager();
23 status_t Init();
25 status_t InstallUserBreakpoint(
26 UserBreakpoint* userBreakpoint,
27 bool enabled);
28 void UninstallUserBreakpoint(
29 UserBreakpoint* userBreakpoint);
31 status_t InstallTemporaryBreakpoint(
32 target_addr_t address,
33 BreakpointClient* client);
34 void UninstallTemporaryBreakpoint(
35 target_addr_t address,
36 BreakpointClient* client);
38 void UpdateImageBreakpoints(Image* image);
39 void RemoveImageBreakpoints(Image* image);
41 private:
42 void _UpdateImageBreakpoints(Image* image,
43 bool removeOnly);
44 status_t _UpdateBreakpointInstallation(
45 Breakpoint* breakpoint);
46 // fLock must be held
48 private:
49 BLocker fLock; // used to synchronize un-/installing
50 Team* fTeam;
51 DebuggerInterface* fDebuggerInterface;
55 #endif // BREAKPOINT_MANAGER_H