Change-Id: I8022d937477668253c613e97c3a579ae65084b1e
This commit is contained in:
Horst Schirmeier
2014-02-09 18:54:21 +01:00
parent 5df364dea2
commit 277958b31b
45 changed files with 430 additions and 444 deletions

View File

@ -1,5 +1,5 @@
#ifndef __PANDA_BREAKPOINTS_AH__
#define __PANDA_BREAKPOINTS_AH__
#define __PANDA_BREAKPOINTS_AH__
#include "config/FailConfig.hpp"
#include "config/VariantConfig.hpp"
@ -11,38 +11,40 @@
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);
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