1
0
mirror of synced 2026-01-11 23:42:44 +00:00

A few goodies and a typo fix. No change in functionality.

This commit is contained in:
Andras Tantos 2024-04-26 16:45:29 -07:00
parent 8b4a0a29e2
commit f183ef4f43
4 changed files with 11 additions and 3 deletions

View File

@ -262,7 +262,7 @@ Type: string
CPU that triggered the breakpoint
Event When fires, triggers an event. The event string is specified
using the 'Event' parameter. The special string {cpu} gets
repleced with the name of the CPU that triggered the breakpoint
replaced with the name of the CPU that triggered the breakpoint
================================================================================
WatchPoints

View File

@ -169,6 +169,7 @@ public:
typedef boost::property_tree::ptree::const_assoc_iterator const_assoc_iterator;
const_iterator begin() const { return mTree->begin(); }
const_iterator end() const { return mTree->end(); }
size_t size() const { return mTree->size(); }
const_assoc_iterator find(const char *aKey) const { DO_OPTIONS_LOG(cerr << "Finding key: " << aKey << endl); return mTree->find(aKey); }
bool empty() const { return mTree->empty(); }

View File

@ -349,7 +349,10 @@ public:
const DebugEventDispatcher_c &GetEventDispatcher() const { return mEventDispatcher; }
DebugEventDispatcher_c &GetEventDispatcher() { return mEventDispatcher; }
void HandleDebugEvent(const DebugEvent_t &aEvent) { mEventPoints.Fire(aEvent); }
void HandleDebugEvent(const DebugEvent_t &aEvent) {
//std::cout << "EVENT POINTS LENGTH: " << mEventPoints.size() << std::endl;
mEventPoints.Fire(aEvent);
}
bool IsMultiThreaded() const { return mMultiThreaded; }
OsTypes_e GetOsType() const { return mOsType; }

View File

@ -72,9 +72,13 @@ public:
};
void Fire(const DebugEvent_t &aEvent) {
for(auto Entry: mBreakPoints) {
if (std::regex_search(aEvent,Entry.Event)) FireBreakPoint(Entry.BreakPoint.get());
if (std::regex_search(aEvent,Entry.Event)) {
//std::cout << "FIRING EVENT POINT" << std::endl;
FireBreakPoint(Entry.BreakPoint.get());
}
}
}
size_t size() const { return mBreakPoints.size(); }
protected:
virtual void FireBreakPoint(tBreakPoint *aBreakPoint) = 0;
virtual std::shared_ptr<tBreakPoint> CreateBreakPoint(const std::string &aBreakPointType, const Configuration_c &aConfig) = 0;