From 7c31724e08f4eb0401150052471c4b6f28ad12f5 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 8 Dec 2021 08:58:45 +0800 Subject: [PATCH] Fixes restart for debugger, need function jerry_port_normalize_path Signed-off-by: Yonggang Luo --- jerry-debugger/jerry_client_main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jerry-debugger/jerry_client_main.py b/jerry-debugger/jerry_client_main.py index 6ce9c0e93a..add2958be8 100644 --- a/jerry-debugger/jerry_client_main.py +++ b/jerry-debugger/jerry_client_main.py @@ -14,6 +14,7 @@ import argparse import logging +import os import re import select import struct @@ -187,7 +188,11 @@ def __init__(self, is_func, byte_code_cp, source, source_name, line, column, nam self.is_func = bool(is_func) self.byte_code_cp = byte_code_cp self.source = re.split("\r\n|[\r\n]", source) - self.source_name = source_name + if source_name: + self.source_name = os.path.relpath(source_name, os.getcwd()) + self.source_name = self.source_name.replace('\\', '/') + else: + self.source_name = source_name self.name = name self.lines = {} self.offsets = {}