mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
24 lines
679 B
C
24 lines
679 B
C
#include "PikaDebug_Debuger.h"
|
|
|
|
extern PikaObj* __pikaMain;
|
|
static enum shell_state __obj_shellLineHandler_debuger(PikaObj* self,
|
|
char* input_line) {
|
|
/* continue */
|
|
if (strEqu("c", input_line)) {
|
|
/* exit pika shell */
|
|
return SHELL_STATE_EXIT;
|
|
}
|
|
if (strEqu("sh", input_line)) {
|
|
/* exit pika shell */
|
|
pikaScriptShell(__pikaMain);
|
|
return SHELL_STATE_CONTINUE;
|
|
}
|
|
}
|
|
|
|
void PikaDebug_Debuger_set_trace(PikaObj* self) {
|
|
struct shell_config cfg = {
|
|
.prefix = "(pika-debug) ",
|
|
};
|
|
obj_shellLineProcess(__pikaMain, __obj_shellLineHandler_debuger, &cfg);
|
|
}
|