haiku/headers/private/debugger/model/Watchpoint.h
Rene Gollent fce4895d18 Debugger: Split into core library and application.
- Add subfolder src/kits/debugger which contains the debugger's core
  functionality and lower layers. Correspondingly add headers/private/debugger
  for shared headers to be used by clients such as the Debugger application
  and eventual remote_debug_server. Adjust various files to account for
  differences as a result of the split and moves.
- Add libdebugger.so to minimal Jamfile.
2016-06-04 13:18:39 -04:00

57 lines
1.3 KiB
C++

/*
* Copyright 2012, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef WATCHPOINT_H
#define WATCHPOINT_H
#include <ObjectList.h>
#include <Referenceable.h>
#include "types/Types.h"
class Watchpoint : public BReferenceable {
public:
Watchpoint(target_addr_t address, uint32 type,
int32 length);
~Watchpoint();
target_addr_t Address() const { return fAddress; }
uint32 Type() const { return fType; }
int32 Length() const { return fLength; }
bool IsInstalled() const { return fInstalled; }
void SetInstalled(bool installed);
bool IsEnabled() const { return fEnabled; }
void SetEnabled(bool enabled);
// WatchpointManager only
bool ShouldBeInstalled() const
{ return fEnabled && !fInstalled; }
bool Contains(target_addr_t address) const;
static int CompareWatchpoints(const Watchpoint* a,
const Watchpoint* b);
static int CompareAddressWatchpoint(
const target_addr_t* address,
const Watchpoint* watchpoint);
private:
target_addr_t fAddress;
uint32 fType;
int32 fLength;
bool fInstalled;
bool fEnabled;
};
typedef BObjectList<Watchpoint> WatchpointList;
#endif // WATCHPOINT_H