|
Pol
Revision:cb584c9
|
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 () | |
| ~ref_counted ()=default | |
Private Member Functions | |
| DebugContext (const DebugContext &) | |
| DebugContext & | operator= (const DebugContext &) |
Private Attributes | |
| bool | _authorized |
| bool | _done |
| ref_ptr< EScriptProgram > | _script |
| weak_ptr< UOExecutor > | uoexec_wptr |
Additional Inherited Members | |
Protected Attributes inherited from ref_counted | |
| std::atomic< unsigned int > | _count |
Definition at line 142 of file poldbg.cpp.
| typedef std::vector<std::string> Pol::Core::DebugContext::Results |
Definition at line 149 of file poldbg.cpp.
| 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().
|
private |
|
protected |
Definition at line 511 of file poldbg.cpp.
References _script, Pol::Bscript::Executor::attach_debugger(), Pol::Core::find_uoexec(), Pol::Bscript::Executor::prog(), Pol::Bscript::EScriptProgram::read_dbg_file(), Pol::Clib::tostring(), uoexec_wptr, and Pol::Core::UOExecutor::weakptr.
Referenced by process().
|
protected |
Definition at line 926 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_break(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 602 of file poldbg.cpp.
References Pol::Core::ScriptDef::config_nodie(), Pol::Core::ScriptDef::exists(), Pol::Bscript::BObject::impptr(), Pol::Bscript::BObject::isa(), Pol::Core::ScriptDef::name(), Pol::Bscript::BObjectImp::OTArray, Pol::Bscript::BObjectImp::pack(), Pol::Bscript::Executor::pushArg(), Pol::Bscript::ObjArray::ref_arr, Pol::Core::run_executor_to_completion(), Pol::Bscript::BObject::setimp(), Pol::Clib::splitnamevalue(), and Pol::Bscript::BObjectImp::unpack().
Referenced by process().
|
protected |
Definition at line 953 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_clrallbp(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 945 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_clrbp(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 560 of file poldbg.cpp.
References Pol::Bscript::Executor::detach_debugger(), Pol::Module::OSExecutorModule::in_debugger_holdlist(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::revive_debugged(), and uoexec_wptr.
Referenced by process(), and ~DebugContext().
|
protected |
Definition at line 1005 of file poldbg.cpp.
References _script, Pol::Bscript::EScriptProgram::dbg_filenames, Pol::Bscript::EScriptProgram::debug_loaded, ISTRINGSTREAM, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 961 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::dbg_filenum, Pol::Bscript::EScriptProgram::dbg_linenum, Pol::Bscript::EScriptProgram::debug_loaded, Pol::Clib::decint(), Pol::Bscript::Executor::PC, Pol::Bscript::Executor::prog(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 983 of file poldbg.cpp.
References _script, Pol::Bscript::EScriptProgram::dbg_filenames, Pol::Bscript::EScriptProgram::debug_loaded, Pol::Clib::decint(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 688 of file poldbg.cpp.
References _script, Pol::Bscript::Instruction::cycles, Pol::Clib::decint(), Pol::Bscript::EPDbgFunction::firstPC, Pol::Bscript::EPDbgFunction::lastPC, and Pol::Bscript::EPDbgFunction::name.
Referenced by process().
|
protected |
Definition at line 749 of file poldbg.cpp.
References _script.
|
protected |
Definition at line 1209 of file poldbg.cpp.
References Pol::Bscript::Executor::Globals2, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1197 of file poldbg.cpp.
References Pol::Bscript::Executor::Locals2, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1072 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::debug_loaded, Pol::Clib::decint(), Pol::Bscript::Executor::Globals2, Pol::Bscript::EScriptProgram::globalvarnames, Pol::Bscript::Executor::prog(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 857 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_get_instruction(), Pol::Bscript::Executor::nLines, Pol::Bscript::Executor::PC, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1164 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::dbg_filenames, Pol::Bscript::EScriptProgram::dbg_filenum, Pol::Bscript::EScriptProgram::dbg_linenum, Pol::Bscript::EScriptProgram::debug_loaded, Pol::Clib::decint(), ISTRINGSTREAM, Pol::Bscript::Executor::prog(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 875 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_ins_trace(), Pol::Module::OSExecutorModule::in_debugger_holdlist(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::revive_debugged(), and uoexec_wptr.
Referenced by process().
|
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().
|
protected |
Definition at line 529 of file poldbg.cpp.
References Pol::Core::find_uoexec(), and Pol::Bscript::Executor::prog().
Referenced by process().
|
protected |
Definition at line 1092 of file poldbg.cpp.
References Pol::Bscript::Executor::Locals2, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1105 of file poldbg.cpp.
References ref_ptr< T >::get(), Pol::Bscript::BObjectImp::get_member(), Pol::Bscript::BObjectImp::getStringRep(), Pol::Bscript::Executor::Locals2, OSTRINGSTREAM, OSTRINGSTREAM_STR, and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1047 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::blocks, Pol::Bscript::EScriptProgram::dbg_ins_blocks, Pol::Bscript::EScriptProgram::debug_loaded, Pol::Bscript::Executor::Locals2, Pol::Bscript::Executor::PC, Pol::Bscript::Executor::prog(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 850 of file poldbg.cpp.
References Pol::Clib::tostring(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 639 of file poldbg.cpp.
References Pol::Clib::decint(), Pol::Core::ScriptScheduler::getPidlist(), Pol::Clib::match(), name, Pol::Bscript::Executor::scriptname(), Pol::Core::scriptScheduler, and Pol::Clib::strlower().
Referenced by process().
|
protected |
|
protected |
Definition at line 914 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_run(), Pol::Module::OSExecutorModule::in_debugger_holdlist(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::revive_debugged(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 775 of file poldbg.cpp.
References ref_counted::count(), Pol::Bscript::EScriptProgram::dbg_get_instruction(), Pol::Clib::decint(), ref_ptr< T >::get(), Pol::Bscript::EScriptProgram::instr, Pol::Bscript::EScriptProgram::read_dbg_file(), Pol::Core::scriptScheduler, and Pol::Core::ScriptScheduler::scrstore.
Referenced by process().
|
protected |
Definition at line 657 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::name, Pol::Core::scriptScheduler, and Pol::Core::ScriptScheduler::scrstore.
Referenced by process().
|
protected |
Definition at line 757 of file poldbg.cpp.
References ref_counted::count(), Pol::Bscript::Instruction::cycles, Pol::Clib::decint(), ref_ptr< T >::get(), Pol::Bscript::EScriptProgram::instr, Pol::Core::scriptScheduler, and Pol::Core::ScriptScheduler::scrstore.
Referenced by process().
|
protected |
Definition at line 812 of file poldbg.cpp.
References ref_counted::count(), Pol::Bscript::EScriptProgram::dbg_filenum, Pol::Bscript::EScriptProgram::dbg_linenum, Pol::Clib::decint(), ref_ptr< T >::get(), Pol::Core::get_fileline(), Pol::Bscript::EScriptProgram::instr, Pol::Bscript::EScriptProgram::read_dbg_file(), Pol::Core::scriptScheduler, and Pol::Core::ScriptScheduler::scrstore.
Referenced by process().
|
protected |
Definition at line 937 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_setbp(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1251 of file poldbg.cpp.
References Pol::Bscript::Executor::Globals2, ISTRINGSTREAM, Pol::Bscript::BObject::setimp(), Pol::Bscript::BObjectImp::unpack(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 1221 of file poldbg.cpp.
References ISTRINGSTREAM, Pol::Bscript::Executor::Locals2, Pol::Bscript::BObject::setimp(), Pol::Bscript::BObjectImp::unpack(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 670 of file poldbg.cpp.
References _script, ref_ptr< T >::get(), Pol::Bscript::EScriptProgram::read_dbg_file(), Pol::Core::scriptScheduler, and Pol::Core::ScriptScheduler::scrstore.
Referenced by process().
|
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().
|
protected |
Definition at line 440 of file poldbg.cpp.
References Pol::Bscript::EScriptProgram::blocks, Pol::Bscript::Executor::ControlStack, Pol::Bscript::EScriptProgram::dbg_filenum, Pol::Bscript::EScriptProgram::dbg_ins_blocks, Pol::Bscript::EScriptProgram::dbg_linenum, Pol::Bscript::EScriptProgram::debug_loaded, Pol::Clib::decint(), Pol::Bscript::Executor::halt(), Pol::Bscript::Executor::Locals2, Pol::Bscript::EPDbgBlock::localvarnames, Pol::Bscript::BObjectImp::pack(), Pol::Bscript::EPDbgBlock::parentvariables, Pol::Bscript::ReturnContext::PC, Pol::Bscript::Executor::PC, Pol::Bscript::Executor::prog(), Pol::Bscript::EScriptProgram::read_dbg_file(), uoexec_wptr, Pol::Bscript::Executor::upperLocals2, Pol::Bscript::Executor::ValueStack, and Pol::Bscript::ReturnContext::ValueStackDepth.
Referenced by process().
|
protected |
Definition at line 580 of file poldbg.cpp.
References Pol::Core::ScriptDef::config_nodie(), Pol::Bscript::ExecutorModule::exec, Pol::Core::ScriptDef::exists(), Pol::Core::ScriptDef::name(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::pid(), Pol::Core::run_executor_to_completion(), Pol::Core::start_script(), and Pol::Clib::tostring().
Referenced by process().
|
protected |
|
protected |
Definition at line 888 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_step_into(), Pol::Module::OSExecutorModule::in_debugger_holdlist(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::revive_debugged(), and uoexec_wptr.
Referenced by process().
|
protected |
Definition at line 901 of file poldbg.cpp.
References Pol::Bscript::Executor::dbg_step_over(), Pol::Module::OSExecutorModule::in_debugger_holdlist(), Pol::Core::UOExecutor::os_module, Pol::Module::OSExecutorModule::revive_debugged(), and uoexec_wptr.
Referenced by process().
|
inline |
Definition at line 151 of file poldbg.cpp.
References pid.
Referenced by Pol::Core::DebugClientThread::run().
|
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().
|
private |
Definition at line 196 of file poldbg.cpp.
|
private |
Definition at line 197 of file poldbg.cpp.
Referenced by cmd_quit().
|
private |
Definition at line 199 of file poldbg.cpp.
Referenced by cmd_attach(), cmd_filecont(), cmd_files(), cmd_funclist(), cmd_funcprof(), cmd_setscript(), and cmd_srcprof().
|
private |
Definition at line 198 of file poldbg.cpp.
Referenced by cmd_attach(), cmd_break(), cmd_clrallbp(), cmd_clrbp(), cmd_detach(), cmd_filecont(), cmd_fileline(), cmd_files(), cmd_getglobalpacked(), cmd_getlocalpacked(), cmd_globalvars(), cmd_ins(), cmd_inslist(), cmd_instrace(), cmd_localvar(), cmd_localvarmembers(), cmd_localvars(), cmd_pc(), cmd_run(), cmd_setbp(), cmd_setglobalpacked(), cmd_setlocalpacked(), cmd_stacktrace(), cmd_state(), cmd_stepinto(), and cmd_stepover().