12 #include "llvm/Support/InterleavedRange.h"
13 #include "llvm/Support/Threading.h"
14 #include "llvm/Support/raw_ostream.h"
25 if (breakpointManagers.empty())
27 return llvm::any_of(breakpointManagers,
35 if (!shouldLog(action))
38 llvm::get_thread_name(name);
40 llvm::raw_svector_ostream os(name);
41 os << llvm::get_threadid();
43 os <<
"[thread " << name <<
"] ";
48 if (printBreakpoints) {
50 os <<
"(on breakpoint: " << *breakpoint <<
") ";
52 os <<
"(no breakpoint) ";
66 if (!shouldLog(action))
69 llvm::get_thread_name(name);
71 llvm::raw_svector_ostream os(name);
72 os << llvm::get_threadid();
74 os <<
"[thread " << name <<
"] completed `" << action->
getAction().
getTag()
virtual void print(raw_ostream &os) const
virtual ArrayRef< IRUnit > getContextIRUnits() const
Return the set of IR units that are associated with this action.
virtual StringRef getTag() const =0
Return a string "tag" which intends to uniquely identify this type of action.
A breakpoint manager is responsible for managing a set of breakpoints and matching them to a given ac...
virtual Breakpoint * match(const Action &action) const =0
Try to match a Breakpoint to a given Action.
This abstract class represents a breakpoint.
Include the generated interface declarations.
This class is used to keep track of the active actions in the stack.
const Action & getAction() const
void beforeExecute(const ActionActiveStack *action, Breakpoint *breakpoint, bool willExecute) override
This method is called before the Action is executed If a breakpoint was hit, it is passed as an argum...
void afterExecute(const ActionActiveStack *action) override
This method is called after the Action is executed, if it was executed.