4 #include <bzscore/sync.h>
10 class SoftwareBreakpointManager;
16 bool m_bEEMInitialized;
18 BazisLib::Event m_TargetStopped;
19 DWORD m_LastStopEvent;
21 WORD m_SoftwareBreakpointWrapperHandle;
23 RUN_MODES_t m_LastResumeMode;
25 unsigned m_HardwareBreakpointsUsed;
28 LONG m_BreakpointAddrOfLastResumeOp;
31 class RAMBreakpointDatabase
34 unsigned char Flags[65536 / 8];
37 RAMBreakpointDatabase()
39 memset(Flags, 0,
sizeof(Flags));
42 void InsertBreakpoint(USHORT addr)
44 Flags[addr >> 3] |= (1 << (addr & 7));
49 Flags[addr >> 3] &= ~(1 << (addr & 7));
52 bool IsBreakpointPresent(USHORT addr)
54 return (Flags[addr >> 3] & (1 << (addr & 7))) != 0;
58 RAMBreakpointDatabase m_RAMBreakpoints;
59 unsigned short m_BreakpointInstruction;
72 : m_bEEMInitialized(false)
73 , m_SoftwareBreakpointWrapperHandle(0)
74 , m_pBreakpointManager(NULL)
75 , m_LastResumeMode(RUN_TO_BREAKPOINT)
76 , m_BreakpointAddrOfLastResumeOp(-1)
77 , m_BreakpointInstruction(0)
78 , m_HardwareBreakpointsUsed(0)
91 static void sEEMHandler(UINT MsgId, UINT wParam, LONG lParam, LONG clientHandle);
92 void EEMNotificationHandler(
MSP430_MSG wMsg, WPARAM wParam, LPARAM lParam);
94 GDBStatus DoCreateCodeBreakpoint(
bool hardware, ULONGLONG Address, INT_PTR *pCookie);
95 GDBStatus DoRemoveCodeBreakpoint(
bool hardware, ULONGLONG Address, INT_PTR Cookie);
98 virtual GDBStatus
CreateBreakpoint(BreakpointType type, ULONGLONG Address,
unsigned kind, OUT INT_PTR *pCookie)
override;
99 virtual GDBStatus
RemoveBreakpoint(BreakpointType type, ULONGLONG Address, INT_PTR Cookie)
override;
104 virtual GDBStatus
ReadTargetMemory(ULONGLONG Address,
void *pBuffer,
size_t *pSizeInBytes)
override;
105 virtual GDBStatus
WriteTargetMemory(ULONGLONG Address,
const void *pBuffer,
size_t sizeInBytes)
override;