Add finish debugger command. (#2240)

With this command the engine continue running just after the function
in the current stack frame returns.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
Imre Kiss
2018-03-12 14:42:48 +01:00
committed by László Langó
parent 685af74a10
commit a79c217aa0
9 changed files with 117 additions and 18 deletions
+12 -4
View File
@@ -28,7 +28,7 @@ import math
import time
# Expected debugger protocol version.
JERRY_DEBUGGER_VERSION = 1
JERRY_DEBUGGER_VERSION = 2
# Messages sent by the server to client.
JERRY_DEBUGGER_CONFIGURATION = 1
@@ -85,9 +85,10 @@ JERRY_DEBUGGER_CONTEXT_RESET = 11
JERRY_DEBUGGER_CONTINUE = 12
JERRY_DEBUGGER_STEP = 13
JERRY_DEBUGGER_NEXT = 14
JERRY_DEBUGGER_GET_BACKTRACE = 15
JERRY_DEBUGGER_EVAL = 16
JERRY_DEBUGGER_EVAL_PART = 17
JERRY_DEBUGGER_FINISH = 15
JERRY_DEBUGGER_GET_BACKTRACE = 16
JERRY_DEBUGGER_EVAL = 17
JERRY_DEBUGGER_EVAL_PART = 18
MAX_BUFFER_SIZE = 128
WEBSOCKET_BINARY_FRAME = 2
@@ -286,6 +287,13 @@ class DebuggerPrompt(Cmd):
do_n = do_next
def do_finish(self, args):
""" Continue running until the current function returns """
self._exec_command(args, JERRY_DEBUGGER_FINISH)
self.cont = True
do_f = do_finish
def do_list(self, _):
""" Lists the available breakpoints """
if self.debugger.active_breakpoint_list: