20#ifndef _INTERACTIVEDEBUGGER_HPP
21#define _INTERACTIVEDEBUGGER_HPP
40 struct XQILLA_API
Run {};
44 static void outputLocation(
const XMLCh *file,
unsigned int line,
unsigned int column,
45 unsigned int context = 0);
47 unsigned int context = 0);
48 static std::string
regexFind(
const char *regex,
const std::string &str,
int groupNo = 1);
52 unsigned int setBreakPoint(
const std::string &file,
unsigned int line,
unsigned int column,
bool temporary);
61 virtual void run() = 0;
91 BreakPoint(
const std::string &f,
unsigned int l,
unsigned int c,
bool t)
92 : file(f), line(l), column(c), temporary(t), disabled(false) {}
115 static bool matches(
const std::string &command,
116 const std::string &toMatch);
117 virtual bool matches(
const std::string &command)
const;
123 const char *briefHelp,
const char *moreHelp)
124 : name_(name), compatName_(compatName), briefHelp_(briefHelp), moreHelp_(moreHelp) {}
145 virtual bool doLazyEvaluation()
const {
return lazy_; }
146 virtual bool doFocusOptimizations()
const {
return focusOptimzations_; }
150 virtual bool changeFrame(
unsigned int number);
151 virtual unsigned int getStackSize()
const;
152 virtual void stackTrace()
const;
153 virtual bool outputCurrentFrame(
unsigned int context)
const;
154 virtual void outputCurrentFrameQueryPlan()
const;
155 virtual bool queryCurrentFrame(
const char *queryString)
const;
156 virtual bool currentFrameLocation(std::string &file,
unsigned int &line,
unsigned int &column)
const;
158 virtual void setDoLazyEvaluation(
bool lazy) { lazy_ = lazy; }
159 virtual void setDoFocusOptimizationsn(
bool opt) { focusOptimzations_ = opt; }
160 virtual void setDoProjection(
bool opt);
162 unsigned int getCurrentFrameNumber()
const;
172 bool focusOptimzations_;
Definition: InteractiveDebugger.hpp:38
std::vector< DebugCommand * > commands_
Definition: InteractiveDebugger.hpp:84
virtual void setDoFocusOptimizationsn(bool opt)=0
static std::string regexFind(const char *regex, const std::string &str, int groupNo=1)
void breakForError(const char *message)
bool queryStarted() const
Definition: InteractiveDebugger.hpp:59
bool enableBreakPoint(unsigned int number)
static void outputLocationFromString(const XMLCh *query, unsigned int line, unsigned int column, unsigned int context=0)
virtual bool changeFrame(unsigned int number)=0
DebugCommand * prevcmd_
Definition: InteractiveDebugger.hpp:85
bool step_
Definition: InteractiveDebugger.hpp:101
virtual unsigned int getStackSize() const =0
void listBreakPoints() const
virtual void setDoLazyEvaluation(bool lazy)=0
virtual bool queryCurrentFrame(const char *queryString) const =0
virtual void stackTrace() const =0
virtual void setDoProjection(bool opt)=0
virtual bool outputCurrentFrame(unsigned int context=0) const =0
std::vector< BreakPoint > breaks_
Definition: InteractiveDebugger.hpp:100
virtual bool currentFrameLocation(std::string &file, unsigned int &line, unsigned int &column) const =0
virtual void outputCurrentFrameQueryPlan() const =0
BaseInteractiveDebugger()
void checkBreak(bool entering)
static void outputLocation(const XMLCh *file, unsigned int line, unsigned int column, unsigned int context=0)
bool queryStarted_
Definition: InteractiveDebugger.hpp:87
unsigned int setBreakPoint(const std::string &file, unsigned int line, unsigned int column, bool temporary)
bool disableBreakPoint(unsigned int number)
virtual ~BaseInteractiveDebugger()
DebugCommand * findCommand(std::string &command) const
unsigned int next_
Definition: InteractiveDebugger.hpp:102
Definition: InteractiveDebugger.hpp:106
virtual bool matches(const std::string &command) const
virtual void execute(InputParser::Args &args, BaseInteractiveDebugger &env)=0
const char * name_
Definition: InteractiveDebugger.hpp:126
virtual const char * getMoreHelp() const
Definition: InteractiveDebugger.hpp:113
static bool matches(const std::string &command, const std::string &toMatch)
virtual const char * getCommandName() const
Definition: InteractiveDebugger.hpp:110
const char * moreHelp_
Definition: InteractiveDebugger.hpp:129
const char * compatName_
Definition: InteractiveDebugger.hpp:127
DebugCommand(const char *name, const char *compatName, const char *briefHelp, const char *moreHelp)
Definition: InteractiveDebugger.hpp:122
virtual const char * getCommandNameCompat() const
Definition: InteractiveDebugger.hpp:111
const char * briefHelp_
Definition: InteractiveDebugger.hpp:128
virtual ~DebugCommand()
Definition: InteractiveDebugger.hpp:108
virtual const char * getBriefHelp() const
Definition: InteractiveDebugger.hpp:112
A class used to listen for debugging information.
Definition: DebugListener.hpp:34
The execution time dynamic context interface.
Definition: DynamicContext.hpp:39
Definition: InteractiveDebugger.hpp:134
static void outputLocation(const LocationInfo *info, unsigned int context=0)
static void debugQuery(const XQQuery *query, DynamicContext *context)
A class that gives records a location in the query.
Definition: LocationInfo.hpp:30
A class that represents an item in a query call stack.
Definition: StackFrame.hpp:46
Definition: XQException.hpp:34
Encapsulates a query expression.
Definition: XQQuery.hpp:76
Definition: InteractiveDebugger.hpp:90
unsigned int column
Definition: InteractiveDebugger.hpp:95
bool disabled
Definition: InteractiveDebugger.hpp:97
bool temporary
Definition: InteractiveDebugger.hpp:96
std::string file
Definition: InteractiveDebugger.hpp:94
BreakPoint(const std::string &f, unsigned int l, unsigned int c, bool t)
Definition: InteractiveDebugger.hpp:91
Definition: InteractiveDebugger.hpp:41
Definition: InteractiveDebugger.hpp:42
Definition: InteractiveDebugger.hpp:40