#ifndef __NASAL_DBG_H__ #define __NASAL_DBG_H__ #include "nasal_vm.h" class nasal_dbg:public nasal_vm { private: bool next_step; uint16_t bk_fidx; uint32_t bk_line; file_line src; std::vector parse(const std::string&); uint16_t get_fileindex(const std::string&); void err(); void help(); void stepinfo(); void interact(); public: nasal_dbg(): next_step(false), bk_fidx(0),bk_line(0){} void run( const nasal_codegen&, const nasal_import& ); }; std::vector nasal_dbg::parse(const std::string& cmd) { std::vector res; std::string tmp=""; for(uint32_t i=0;i\n" <<"\th, help | get help\n" <<"\tbt, backtrace | get function call trace\n" <<"\tc, continue | run program until break point or exit\n" <<"\tg, global | see global values\n" <<"\tl, local | see local values\n" <<"\tu, upval | see upvalue\n" <<"\ta, all | show global,local and upvalue\n" <<"\tn, next | execute next bytecode\n" <<"\tq, exit | exit debugger\n" <<"