12 #include "llvm/Support/Threading.h"
13 #include "llvm/Support/raw_ostream.h"
24 if (breakpointManagers.empty())
26 return llvm::any_of(breakpointManagers,
34 if (!shouldLog(action))
37 llvm::get_thread_name(name);
39 llvm::raw_svector_ostream os(name);
40 os << llvm::get_threadid();
42 os <<
"[thread " << name <<
"] ";
47 if (printBreakpoints) {
49 os <<
"(on breakpoint: " << *breakpoint <<
") ";
51 os <<
"(no breakpoint) ";
67 if (!shouldLog(action))
70 llvm::get_thread_name(name);
72 llvm::raw_svector_ostream os(name);
73 os << llvm::get_threadid();
75 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.