diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:07:37 +0000 |
commit | b485aab7e71c1625cfc27e0f92c9509f42378458 (patch) | |
tree | ae9abe108601079d1679194de237c9a435ae5b55 /web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.tar.xz netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.zip |
Adding upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c')
-rw-r--r-- | web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c b/web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c deleted file mode 100644 index cb4c738fc..000000000 --- a/web/server/h2o/libh2o/deps/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c +++ /dev/null @@ -1,64 +0,0 @@ -/* -** cmdrun.c - mruby debugger run command functions -** -*/ - -#include <mruby/opcode.h> -#include "mrdb.h" - -dbgcmd_state -dbgcmd_run(mrb_state *mrb, mrdb_state *mrdb) -{ - mrb_debug_context *dbg = mrdb->dbg; - - if (dbg->xm == DBG_INIT){ - dbg->xm = DBG_RUN; - } - else { - dbg->xm = DBG_QUIT; - if (dbg->xphase == DBG_PHASE_RUNNING){ - struct RClass *exc; - puts("Start it from the beginning."); - exc = mrb_define_class(mrb, "DebuggerRestart", mrb_class_get(mrb, "Exception")); - mrb_raise(mrb, exc, "Restart mrdb."); - } - } - - return DBGST_RESTART; -} - -dbgcmd_state -dbgcmd_continue(mrb_state *mrb, mrdb_state *mrdb) -{ - mrb_debug_context *dbg = mrdb->dbg; - int ccnt = 1; - - if (mrdb->wcnt > 1){ - sscanf(mrdb->words[1], "%d", &ccnt); - } - dbg->ccnt = (uint16_t)(ccnt > 0 ? ccnt : 1); /* count of continue */ - - if (dbg->xphase == DBG_PHASE_AFTER_RUN){ - puts("The program is not running."); - dbg->xm = DBG_QUIT; - } - else { - dbg->xm = DBG_RUN; - } - return DBGST_CONTINUE; -} - -dbgcmd_state -dbgcmd_step(mrb_state *mrb, mrdb_state *mrdb) -{ - mrdb->dbg->xm = DBG_STEP; - return DBGST_CONTINUE; -} - -dbgcmd_state -dbgcmd_next(mrb_state *mrb, mrdb_state *mrdb) -{ - mrdb->dbg->xm = DBG_NEXT; - mrdb->dbg->prvci = mrb->c->ci; - return DBGST_CONTINUE; -} |