5 #ifndef CHI_DEBUGGER_DEBUGGER_HPP     6 #define CHI_DEBUGGER_DEBUGGER_HPP     8 #include <lldb/API/SBBreakpoint.h>     9 #include <lldb/API/SBDebugger.h>    10 #include <lldb/API/SBListener.h>    11 #include <lldb/API/SBProcess.h>    12 #include <lldb/API/SBTarget.h>    47         const char** argv = 
nullptr, 
const char** envp = 
nullptr,
    48         const boost::filesystem::path& workingDirectory = boost::filesystem::current_path());
    63         return lldbProcess().GetState() == lldb::eStateRunning;
   129     lldb::SBDebugger mDebugger;
   130     lldb::SBTarget   mTarget;
   131     lldb::SBProcess  mProcess;
   135     std::unordered_map<const NodeInstance*, lldb::SBBreakpoint> mBreakpoints;
   145 #endif  // CHI_DEBUGGER_DEBUGGER_HPP Result start(const char **argv=nullptr, const char **envp=nullptr, const boost::filesystem::path &workingDirectory=boost::filesystem::current_path())
Start debugging the process. 
 
bool isAttached() const
Check if this debugger is attached to a process It's true if the process is stopped or if it's curret...
 
GraphModule & module() const
Get the module that's being debugged by this debugger. 
 
Result processContinue()
Continue the execution of the process. 
 
Result setBreakpoint(NodeInstance &node, lldb::SBBreakpoint *bp=nullptr)
Set a breakpoint on a given node. 
 
Result pause()
Pause the execution state. 
 
Result terminate()
Terminate the inferior process. 
 
lldb::SBTarget lldbTarget() const
Get the target Keep in mind the return isn't necessarily valid, although it should be...
 
lldb::SBProcess lldbProcess() const
Get the process This will only be valid if there's an attached process. 
 
bool running() const
Check if the process is executing. 
 
lldb::SBValue inspectLocalVariable(boost::string_view name)
Get the value of a local variable. 
 
lldb::SBValue inspectNodeOutput(const NodeInstance &inst, size_t id, lldb::SBFrame frame={})
Get the output of a node. 
 
unsigned lineNumberFromNode(NodeInstance &inst)
Get the mapped line number from a node. 
 
NodeInstance * nodeFromFrame(lldb::SBFrame frame={})
Get a NodeInstance from a frame. 
 
std::vector< const NodeInstance * > listBreakpoints() const
List the curretnly set breakpoints. 
 
Debugger(const char *pathToChig, GraphModule &mod)
Default constructor. 
 
bool removeBreakpoint(NodeInstance &node)
Remove a breakpoint from a node. 
 
Module that holds graph functions. 
 
Defines the GraphModule class. 
 
The namespace where chigraph lives. 
 
The result object, used for identifiying errors with good diagnostics. 
 
lldb::SBDebugger lldbDebugger() const
Get the debugger This should probably be valid...not sure why it wouldn't be. 
 
Declares the GraphFunction class. 
 
Helper class for using LLDB with chigraph.