Enabling both CONFIG_FAST_BREAKPOINTS / CONFIG_FAST_WATCHPOINTS and CONFIG_EVENT_BREAKPOINTS / CONFIG_EVENT_BREAKPOINTS_RANGE / CONFIG_EVENT_MEMREAD / CONFIG_EVENT_MEMWRITE led to an (unnecessary) include cycle. Change-Id: I8144e3e72da69b98e21a844a4bfded1b77bdce07
51 lines
1.0 KiB
Plaintext
51 lines
1.0 KiB
Plaintext
#ifndef __PANDA_BREAKPOINTS_AH__
|
|
#define __PANDA_BREAKPOINTS_AH__
|
|
|
|
#include "config/FailConfig.hpp"
|
|
#include "config/VariantConfig.hpp"
|
|
|
|
#if defined(BUILD_PANDA) && defined(CONFIG_EVENT_BREAKPOINTS)
|
|
|
|
#include "../../../debuggers/openocd/openocd_wrapper.hpp"
|
|
|
|
aspect PandaBreakpoints
|
|
{
|
|
|
|
advice "fail::BPSingleListener" : slice class
|
|
{
|
|
public:
|
|
bool onAddition()
|
|
{
|
|
// Setup Breakpoint on Pandaboard
|
|
struct halt_condition hc;
|
|
if (m_WatchInstrPtr == ANY_ADDR) {
|
|
hc.type = HALT_TYPE_SINGLESTEP;
|
|
} else {
|
|
hc.type = HALT_TYPE_BP;
|
|
}
|
|
hc.address = m_WatchInstrPtr;
|
|
hc.addr_len = 4; // Thumb? => 2
|
|
oocdw_set_halt_condition(&hc);
|
|
return true;
|
|
}
|
|
|
|
void onDeletion()
|
|
{
|
|
// Delete Breakpoint on Pandaboard
|
|
struct halt_condition hc;
|
|
if (m_WatchInstrPtr == ANY_ADDR) {
|
|
hc.type = HALT_TYPE_SINGLESTEP;
|
|
} else {
|
|
hc.type = HALT_TYPE_BP;
|
|
}
|
|
hc.address = m_WatchInstrPtr;
|
|
hc.addr_len = 4; // Thumb? => 2
|
|
oocdw_delete_halt_condition(&hc);
|
|
}
|
|
};
|
|
|
|
};
|
|
|
|
#endif // BUILD_PANDA && CONFIG_EVENT_BREAKPOINTS
|
|
#endif // __PANDA_BREAKPOINTS_AH__
|