Pol  Revision:3cfda13
Pol::Core::DebugContext Class Reference
+ Inheritance diagram for Pol::Core::DebugContext:

Public Types

typedef std::vector< std::string > Results
 

Public Member Functions

 DebugContext ()
 
 ~DebugContext ()
 
bool done () const
 
bool process (const std::string &cmd, Results &results)
 [1] Debugger Commands: password [pwd] Authorize with password quit exit debugger start [eclfile] Start a script call [eclfile] [params:packed array] call a script attach [pid] Attach to a running script kill [pid] Kill a running script detach Detach from attached script state State of attached script ins Show instructions near execution point instrace Execute next instruction only stepinto Trace to next statement, into functions if necessary stepover Trace to next statement, skipping called functions run Run script full speed (until breakpoint hit if any) break Break into running script setbp [ins] Set breakpoint at instruction clrbp [ins] Clear breakpoint at instruction clrallbp Clear all breakpoints fileline {ins} File # and Line # associated with an instruction files list the source files used by this script filecont [file] {firstline} {lastline} get file contents localvars list local variable names inslist [file] [line] Return list of instructions assoc with a file/line pidlist [str] list PIDs and scriptnames matching str loadsym [pid] load symbols for a script scriptlist scriptprofile scriptins [filename] More...
 
std::string prompt () const
 
- Public Member Functions inherited from ref_counted
unsigned int add_ref ()
 
unsigned int count () const
 
unsigned int release ()
 

Protected Member Functions

std::string cmd_attach (unsigned pid)
 
std::string cmd_break ()
 
std::string cmd_call (const std::string &rest, Results &results)
 
std::string cmd_clrallbp ()
 
std::string cmd_clrbp (const std::string &rest)
 
std::string cmd_detach ()
 
std::string cmd_filecont (const std::string &rest, Results &results)
 
std::string cmd_fileline (const std::string &rest)
 
std::string cmd_files (Results &results)
 
std::string cmd_funclist (const std::string &rest, Results &results)
 
std::string cmd_funcprof (const std::string &rest, Results &results)
 
std::string cmd_getglobalpacked (const std::string &rest)
 
std::string cmd_getlocalpacked (const std::string &rest)
 
std::string cmd_globalvars (Results &results)
 
std::string cmd_ins (Results &results)
 
std::string cmd_inslist (const std::string &rest, Results &results)
 
std::string cmd_instrace ()
 
std::string cmd_kill (unsigned pid)
 
std::string cmd_loadsym (unsigned pid)
 
std::string cmd_localvar (const std::string &rest)
 
std::string cmd_localvarmembers (const std::string &rest, Results &results)
 
std::string cmd_localvars (Results &results)
 
std::string cmd_pc ()
 
std::string cmd_pidlist (const std::string &rest, Results &results)
 
std::string cmd_quit ()
 
std::string cmd_run ()
 
std::string cmd_scriptins (const std::string &rest, Results &results)
 
std::string cmd_scriptlist (const std::string &rest, Results &results)
 
std::string cmd_scriptprofile (const std::string &rest, Results &results)
 
std::string cmd_scriptsrc (const std::string &rest, Results &results)
 
std::string cmd_setbp (const std::string &rest)
 
std::string cmd_setglobalpacked (const std::string &rest)
 
std::string cmd_setlocalpacked (const std::string &rest)
 
std::string cmd_setscript (const std::string &rest, Results &results)
 
std::string cmd_srcprof (const std::string &rest, Results &results)
 
std::string cmd_stacktrace (Results &results)
 
std::string cmd_start (const std::string &rest)
 
std::string cmd_state ()
 
std::string cmd_stepinto ()
 
std::string cmd_stepover ()
 
- Protected Member Functions inherited from ref_counted
 ref_counted ()
 

Private Member Functions

 DebugContext (const DebugContext &)
 
DebugContextoperator= (const DebugContext &)
 

Private Attributes

bool _authorized
 
bool _done
 
ref_ptr< EScriptProgram_script
 
weak_ptr< UOExecutoruoexec_wptr
 

Additional Inherited Members

- Protected Attributes inherited from ref_counted
std::atomic< unsigned int > _count
 

Detailed Description

Definition at line 142 of file poldbg.cpp.

Member Typedef Documentation

typedef std::vector<std::string> Pol::Core::DebugContext::Results

Definition at line 149 of file poldbg.cpp.

Constructor & Destructor Documentation

Pol::Core::DebugContext::DebugContext ( )

Definition at line 275 of file poldbg.cpp.

Pol::Core::DebugContext::~DebugContext ( )

Definition at line 282 of file poldbg.cpp.

References cmd_detach().

Pol::Core::DebugContext::DebugContext ( const DebugContext )
private

Member Function Documentation

std::string Pol::Core::DebugContext::cmd_attach ( unsigned  pid)
protected
std::string Pol::Core::DebugContext::cmd_break ( )
protected

Definition at line 926 of file poldbg.cpp.

References Pol::Bscript::Executor::dbg_break(), and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_clrallbp ( )
protected

Definition at line 953 of file poldbg.cpp.

References Pol::Bscript::Executor::dbg_clrallbp(), and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_clrbp ( const std::string &  rest)
protected

Definition at line 945 of file poldbg.cpp.

References Pol::Bscript::Executor::dbg_clrbp(), and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_filecont ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_fileline ( const std::string &  rest)
protected
std::string Pol::Core::DebugContext::cmd_files ( Results results)
protected
std::string Pol::Core::DebugContext::cmd_funclist ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_funcprof ( const std::string &  rest,
Results results 
)
protected

Definition at line 749 of file poldbg.cpp.

References _script.

std::string Pol::Core::DebugContext::cmd_getglobalpacked ( const std::string &  rest)
protected

Definition at line 1209 of file poldbg.cpp.

References Pol::Bscript::Executor::Globals2, and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_getlocalpacked ( const std::string &  rest)
protected

Definition at line 1197 of file poldbg.cpp.

References Pol::Bscript::Executor::Locals2, and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_globalvars ( Results results)
protected
std::string Pol::Core::DebugContext::cmd_ins ( Results results)
protected
std::string Pol::Core::DebugContext::cmd_inslist ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_kill ( unsigned  pid)
protected

Definition at line 546 of file poldbg.cpp.

References Pol::Core::find_uoexec(), Pol::Bscript::Executor::seterror(), and Pol::Clib::tostring().

Referenced by process().

std::string Pol::Core::DebugContext::cmd_loadsym ( unsigned  pid)
protected

Definition at line 529 of file poldbg.cpp.

References Pol::Core::find_uoexec(), and Pol::Bscript::Executor::prog().

Referenced by process().

std::string Pol::Core::DebugContext::cmd_localvar ( const std::string &  rest)
protected

Definition at line 1092 of file poldbg.cpp.

References Pol::Bscript::Executor::Locals2, and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_localvarmembers ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_pc ( )
protected

Definition at line 850 of file poldbg.cpp.

References Pol::Clib::tostring(), and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_pidlist ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_quit ( )
protected

Definition at line 574 of file poldbg.cpp.

References _done.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_scriptlist ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_scriptprofile ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_setbp ( const std::string &  rest)
protected

Definition at line 937 of file poldbg.cpp.

References Pol::Bscript::Executor::dbg_setbp(), and uoexec_wptr.

Referenced by process().

std::string Pol::Core::DebugContext::cmd_setglobalpacked ( const std::string &  rest)
protected
std::string Pol::Core::DebugContext::cmd_setlocalpacked ( const std::string &  rest)
protected
std::string Pol::Core::DebugContext::cmd_setscript ( const std::string &  rest,
Results results 
)
protected
std::string Pol::Core::DebugContext::cmd_srcprof ( const std::string &  rest,
Results results 
)
protected

Definition at line 714 of file poldbg.cpp.

References _script, ref_counted::count(), Pol::Bscript::Instruction::cycles, and Pol::Clib::decint().

Referenced by process().

std::string Pol::Core::DebugContext::cmd_state ( )
protected

Definition at line 843 of file poldbg.cpp.

References uoexec_wptr.

Referenced by process().

bool Pol::Core::DebugContext::done ( ) const
inline

Definition at line 151 of file poldbg.cpp.

References pid.

Referenced by Pol::Core::DebugClientThread::run().

DebugContext& Pol::Core::DebugContext::operator= ( const DebugContext )
private
bool Pol::Core::DebugContext::process ( const std::string &  cmd,
Results results 
)

[1] Debugger Commands: password [pwd] Authorize with password quit exit debugger start [eclfile] Start a script call [eclfile] [params:packed array] call a script attach [pid] Attach to a running script kill [pid] Kill a running script detach Detach from attached script state State of attached script ins Show instructions near execution point instrace Execute next instruction only stepinto Trace to next statement, into functions if necessary stepover Trace to next statement, skipping called functions run Run script full speed (until breakpoint hit if any) break Break into running script setbp [ins] Set breakpoint at instruction clrbp [ins] Clear breakpoint at instruction clrallbp Clear all breakpoints fileline {ins} File # and Line # associated with an instruction files list the source files used by this script filecont [file] {firstline} {lastline} get file contents localvars list local variable names inslist [file] [line] Return list of instructions assoc with a file/line pidlist [str] list PIDs and scriptnames matching str loadsym [pid] load symbols for a script scriptlist scriptprofile scriptins [filename]

Definition at line 324 of file poldbg.cpp.

References _authorized, cmd_attach(), cmd_break(), cmd_call(), cmd_clrallbp(), cmd_clrbp(), cmd_detach(), cmd_filecont(), cmd_fileline(), cmd_files(), cmd_funclist(), cmd_getglobalpacked(), cmd_getlocalpacked(), cmd_globalvars(), cmd_ins(), cmd_inslist(), cmd_instrace(), cmd_kill(), cmd_loadsym(), cmd_localvar(), cmd_localvarmembers(), cmd_localvars(), cmd_pc(), cmd_pidlist(), cmd_quit(), cmd_run(), cmd_scriptins(), cmd_scriptlist(), cmd_scriptprofile(), cmd_scriptsrc(), cmd_setbp(), cmd_setglobalpacked(), cmd_setlocalpacked(), cmd_setscript(), cmd_srcprof(), cmd_stacktrace(), cmd_start(), cmd_state(), cmd_stepinto(), cmd_stepover(), Pol::Plib::SystemState::config, Pol::Core::PolConfig::debug_password, Pol::Clib::splitnamevalue(), and Pol::Plib::systemstate.

Referenced by Pol::Core::create_debug_context(), and Pol::Core::DebugClientThread::run().

std::string Pol::Core::DebugContext::prompt ( ) const

Definition at line 287 of file poldbg.cpp.

References _authorized.

Referenced by Pol::Core::DebugClientThread::run().

Member Data Documentation

bool Pol::Core::DebugContext::_authorized
private

Definition at line 196 of file poldbg.cpp.

Referenced by process(), and prompt().

bool Pol::Core::DebugContext::_done
private

Definition at line 197 of file poldbg.cpp.

Referenced by cmd_quit().

ref_ptr<EScriptProgram> Pol::Core::DebugContext::_script
private

The documentation for this class was generated from the following file: